示例#1
0
 // Use this for initialization
 void Start()
 {
     audioSource = GetComponent <AudioSource>();
     gameRunning = false;
     mm          = MobaManager.instance;
     GenerateSmileysPool();
     ShufflePool();
     FillMap();
     CheckCollision();
     gameRunning = true;
 }
示例#2
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }
        //DontDestroyOnLoad(gameObject);
        powerLbl    = GameObject.Find("PowerValue");
        enemyHpLbl  = GameObject.Find("EnemyHPValue");
        playerHpLbl = GameObject.Find("PlayerHPValue");

        powerLbl.GetComponent <Text>().text    = power.ToString();
        enemyHpLbl.GetComponent <Text>().text  = enemyHealth.ToString();
        playerHpLbl.GetComponent <Text>().text = playerHealth.ToString();
    }
示例#3
0
 // Use this for initialization
 void Start()
 {
     moba = MobaManager.instance;        //FindObjectOfType(typeof(MobaManager)) as MobaManager;
     InvokeRepeating("enemyAI", 0, 1);
     InvokeRepeating("enemyCash", 0, 1);
 }