public override void Init(ObjectManager _objectManager, bool isEnemyTeam, int objectLevel) { base.Init(_objectManager, isEnemyTeam, objectLevel); cargoKart = Directors.instance.playerManager.GetCargoKart(); manaIndicationCircle.Init(); manaIndicationCircle.SetTargetGameObject(this.gameObject); manaCircleStartSize = manaIndicationCircle.transform.localScale.x; objectData.currentSpecialCoolDown = objectData.specialCoolDown; screenAspectRatio = Screen.width / (float)Screen.height; }
public override void Init() { base.Init(); if (cargoKart == null) { cargoKart = FindObjectOfType <CargoKart>(); } fireHero = FindObjectOfType <FireHero>(); waterHero = FindObjectOfType <WaterHero>(); cargoKart.Init(this, false, 1); heroList.AddRange(FindObjectsOfType <HeroObject>()); for (int i = 0; i < heroList.Count; i++) { heroList[i].Init(this, false, 1); } }
public override void Init() { base.Init(); CargoKart tempCargoKart = FindObjectOfType <CargoKart>(); if (cargoKart != null) { Destroy(cargoKart.gameObject); } cargoKart = tempCargoKart; cargoKart.Init(this, false, 1); heroList = new List <BaseHero>(); heroList.AddRange(FindObjectsOfType <BaseHero>()); for (int i = 0; i < heroList.Count; i++) { //default level is 1 heroList[i].Init(this, false, 1); } //director.StartBattle(); Debug.Log("<color=green>Battle state </color>" + director.GetBattleState()); }