Example #1
0
            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);
            }
Example #2
0
            public void Init(data.MissileInstance missileInstance)
            {
                MissileInstance = missileInstance;
                CurrentState    = State.Inactive;

                SpriteRenderer sprren = MissileInstance.BattleVisual.transform.Find("Visual").GetComponent <SpriteRenderer> ();

                charImage.sprite = sprren.sprite;
            }
Example #3
0
            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);
            }
Example #4
0
            public void ReleaseMissile(data.MissileInstance missileInstance, obj.Types.Side side)
            {
                obj.MissileVisual missileVisual = BattleFactory.CreateMissileBattleVisual(missileInstance, new Context(this), side);

                missileVisual.Init();
            }