Example #1
0
    // Use this for initialization
    void Start()
    {
        GameObject gmControl = GameObject.FindGameObjectWithTag("GameController");

        if (gmControl != null)
        {
            controller             = gmControl.GetComponent <GameController> ();
            controller.player1Name = _p1NameDown;
            controller.player2Name = _p2NameDown;
            controller.pow1        = pow1;
            controller.pow2        = pow2;
            controller.SetName();
            pow1 = controller.pow1;
            pow2 = controller.pow2;
        }

        winnerMenu.SetWinnerMenuAble(false);

        _gestureBang = GestureDetectureBang.GetSharedGestureDetector();

        _gestureBang.AddListener(this);

        ChangeStateTo(GameState.Default);

        ads = new PowliticosADS();
    }
 void Awake()
 {
     ///InicializaĆ§Ć£o do Singleton
     if (sharedInstance == null)
     {
         sharedInstance = this;
         messageTargets = new List <TouchObserver>();
     }
     else
     {
         Destroy(gameObject);
     }
 }