Esempio n. 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;
        }
Esempio n. 2
0
 // Use this for initialization
 public virtual void Init()
 {
     questCompleted = false;
     gameScene      = GameApp.GetInstance().GetGameScene();
 }
Esempio n. 3
0
 public void ClearScene()
 {
     scene = null;
 }
Esempio n. 4
0
 // Use this for initialization
 public void Init()
 {
     spotTransform = bombSpotObj.transform;
     gameScene     = GameApp.GetInstance().GetGameScene();
 }