Esempio n. 1
0
File: UnitT.cs Progetto: naaturaz/SM
 internal void Selected()
 {
     if (SelectedGO != null)
     {
         SelectedGO.SetActive(true);
         _selectedAt = Time.time;
     }
 }
Esempio n. 2
0
File: UnitT.cs Progetto: naaturaz/SM
    // Use this for initialization
    protected void Start()
    {
        base.Start();
        StartCoroutine("RandomSecUpdate");

        SelectedGO = GetChildCalled("Selected");
        if (SelectedGO != null)
        {
            SelectedGO.SetActive(false);
        }

        if (name.Contains("Enemy"))
        {
            var a = name.Substring(5).Split('/');
            var n = a[a.Length - 1];
            Health = 8;
        }
        else
        {
            Health = 9;
        }
    }