예제 #1
0
    private IEnumerator LoadRocket()
    {
        yield return(new WaitForSeconds(0.1f));

        currentRocket = (PlayerRocket)prefab.GetInstance();
        FollowTransform();
        yield return(null);
    }
예제 #2
0
 public void LaunchRocket(Vector2 toPoint)
 {
     if (currentRocket != null)
     {
         SoundControl.instance.Play(SoundControl.SoundClip.ROCKET_LAUNCH);
         currentRocket.Launch(toPoint);
         currentRocket = null;
         StartCoroutine("LoadRocket");
     }
 }
예제 #3
0
        public override GameObject GetGameObject(GameObjectCoords objectCoords)
        {
            GameObjectCoords rocketCoords = new GameObjectCoords()
            {
                XCoord = objectCoords.XCoord, YCoord = objectCoords.YCoord - 1
            };
            GameObject rocket = new PlayerRocket()
            {
                Shape = GameSettings.PlayerRocket, GameObjectCoords = rocketCoords, GameObjectType = GameObjectType.PlayerRocket
            };

            return(rocket);
        }
예제 #4
0
 public void AwakeFunc()
 {
     this.M_Rigidbody2D  = GetComponent <Rigidbody2D>();
     this.InjectionFire  = this.transform.Find("InjectionFire").gameObject;
     this.M_PlayerRocket = GetComponent <PlayerRocket>();
 }