系统的制作和飞机大战的完善

   欢迎来到 unity 学习 、 unity 培训 、 unity 企业培训 教育专区,这里有很多 U3D 资源 、 U3D 培训视频 U3D 教 程 U3D 常见问题 、 U3D 项目源码, 我们致力于打造业内 unity3d 培训 、学习第一品牌。 

 在这里说一下用U盘安装电脑系统啊,这样就不用为电脑的系统而烦恼了啊。

1.首先下一个大白菜,然后安在电脑上,注意不要安装在你所用的U盘上,(U盘在使用前,请把里面有用的数据拷出去,然后格式化U盘。)。

2.然后打开大白菜,选择你所需要的U盘,模式使用的是HDD-FAT32,点击“一键制作USB启动盘”就把U盘制作好了啊。

3然后在网上找到系统的ios镜像,拷到你的U盘中。

4.  重新启动电脑,不同的电脑有不同的启动键啊 联想的一般是F12,然后点击U盘启动,然后运行PE。通过一系列的点击就可以完成系统的安装。

  完善飞机大战的一写东西,实现游戏的重新开始和结束。

Time .timeScale = 0; 游戏结束; Time .timeScale = 1; 游戏开始;

改变label标签字号的大小

GUI .skin .label .fontSize = 15;


改变字体的颜色

GUI.color =Color.red ;

 

实现页面的跳转:

Application.LoadLevel ("PlaneFight");


public float lifeTimes = 0;//我方生命值

    public int score = 0;//分数

    public static GameManage instance;

    public Player player;

public bool flag=false ;//标志游戏的开始

// Use this for initialization

void Start () {

instance=this;

    player = GameObject.FindGameObjectWithTag("Pl").GetComponent<Player>();

}

// Update is called once per frame

void Update () {

if (flag) {

Time .timeScale = 0;

} else {

if(Input.GetKey (KeyCode .Escape )){

 

Time .timeScale = 0;

}

if(Input.GetButton ("Fire1")){

Time .timeScale = 1;

}

 

}

}

    void OnGUI()

    {

GUI .skin .label .fontSize = 15;

GUI.color =Color.red ;

        lifeTimes = player.lifeTime;

        GUI.Label(new Rect(20, 30, 100, 40), "生命值为:" + lifeTimes);

        GUI.Label(new Rect(20, 70, 100, 40), "分数:" + score);

if(lifeTimes ==0){

flag =true;

 

GUI .skin .label .fontSize =25;

GUI.color =Color.red ;

GUI.Label (new Rect (200,200,100,50),"游戏结束");

GUI.skin .label .fontSize =25;

GUI.color =Color .white ;

if(GUI.Button (new Rect (200,270,100,50),"重新开始")){

 

Application.LoadLevel ("PlaneFight");

 

}

}

}

 

 

   

 

 

  

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值