Exemple #1
0
        public void Init()
        {
            thumbCenter.x = AutoRect.AutoX(110);
            thumbCenter.y = AutoRect.AutoY(530);
            thumbRadius   = AutoRect.AutoValue(85);


            shootThumbCenter.x = AutoRect.AutoX(852);
            shootThumbCenter.y = AutoRect.AutoY(530);

            if (AutoRect.GetPlatform() == Platform.IPad)
            {
                thumbCenter.x      = AutoRect.AutoX(66);
                shootThumbCenter.x = AutoRect.AutoX(896);
                thumbCenter.y      = AutoRect.AutoY(500);
                shootThumbCenter.y = AutoRect.AutoY(500);
            }



            thumbCenterToScreen      = new Vector2(thumbCenter.x, Screen.height - thumbCenter.y);
            shootThumbCenterToScreen = new Vector2(shootThumbCenter.x, Screen.height - shootThumbCenter.y);

            lastShootTouch = shootThumbCenterToScreen;
            for (int i = 0; i < 2; i++)
            {
                lastTouch[i] = new Touch();
            }

            gameScene = GameApp.GetInstance().GetGameScene();
            player    = gameScene.GetPlayer();

            EnableMoveInput     = true;
            EnableShootingInput = true;
            EnableTurningAround = true;
        }
Exemple #2
0
 // Use this for initialization
 public virtual void Init()
 {
     questCompleted = false;
     gameScene      = GameApp.GetInstance().GetGameScene();
 }
Exemple #3
0
 public void ClearScene()
 {
     scene = null;
 }
Exemple #4
0
 // Use this for initialization
 public void Init()
 {
     spotTransform = bombSpotObj.transform;
     gameScene     = GameApp.GetInstance().GetGameScene();
 }