public void Init(battle.Context context, data.MissileInstance missileInstance, Types.Side side) { HitDestroyables = new List <IDestroyable> (); Context = context; InstanceClone = missileInstance.Clone(); Side = side; Context.Battle.RegisterListener(this); }
public void Init(data.MissileInstance missileInstance) { MissileInstance = missileInstance; CurrentState = State.Inactive; SpriteRenderer sprren = MissileInstance.BattleVisual.transform.Find("Visual").GetComponent <SpriteRenderer> (); charImage.sprite = sprren.sprite; }
public obj.MissileVisual CreateMissileBattleVisual(data.MissileInstance fromInstance, battle.Context context, obj.Types.Side side) { GameObject visualGo = GameObject.Instantiate(fromInstance.BattleVisual) as GameObject; obj.MissileVisual visual = visualGo.GetComponent <obj.MissileVisual> (); visual.Init(context, fromInstance, side); return(visual); }
public void ReleaseMissile(data.MissileInstance missileInstance, obj.Types.Side side) { obj.MissileVisual missileVisual = BattleFactory.CreateMissileBattleVisual(missileInstance, new Context(this), side); missileVisual.Init(); }