zoukankan      html  css  js  c++  java
  • Unity KillCount

    using UnityEngine;
    using System.Collections;


    public class KillCountMult : MonoBehaviour {

    public GUIText kText;
    public static int kills1;
    public static int kills2;
    public static bool playerKilled;
    public static bool player2Killed;


    void Start () {
    kills1 = 0;
    kills2 = 0;
    playerKilled = false;
    player2Killed = false;
    }


    // Update is called once per frame
    void Update () {
    kText.text = "P1:" + kills1.ToString() + System.Environment.NewLine + "P2:" + kills2.ToString();


    if (playerKilled && player2Killed) {
    Application.LoadLevel ("GameOver");
    }
    }
    }
  • 相关阅读:
    使用GitHub+hexo搭建个人独立博客
    HDU 3038
    POJ 1417
    HDU 1213
    ZOJ 3781
    ZOJ 3780
    ZOJ 3777
    HDU 3045
    HDU 3480
    POJ 1180
  • 原文地址:https://www.cnblogs.com/zfyouxi/p/5173317.html
Copyright © 2011-2022 走看看