// Use this for initialization new void Start() { gameManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <Manager_Game>(); gameRules = gameManager.GameRules; // Grab copy of Game Rules base.Start(); // Init Unit base class gameManager.GetCommander(Team).SetFlagship(this); shieldMod = new ShieldMod(this, 1, ShieldModType.Flagship); AddShieldMod(shieldMod); // Apply flagship shield to self UpdateHPBarVal(true); // Update with new shield }
// Use this for initialization new void Start() { base.Start(); shieldMod = new ShieldMod(parentUnit, 1, ShieldModType.ShieldMode); //abilityBar = parentUnit.hpBar.GetComponent<UI_AbilBar_ShieldProject>(); //abilityBar.SetShield(shieldMod.shieldPercent, shieldMod.shieldPercent < 0); meshEffect = Instantiate(meshEffectPrefab, transform.position, Quaternion.identity); meshEffect.SetEffectActive(false); audioLoop = Instantiate(audioLoopPrefab, transform.position, Quaternion.identity); audioLoop.transform.parent = transform; audioLoop.SetEffectActive(false); }