void Start()
 {
     //Get our Gamemanagers and duel controller
     glob_gamemanager  = GameObject.FindGameObjectWithTag("GameManager");
     glob_audiomanager = GameObject.FindGameObjectWithTag("audio_manager");
     duelController    = duelSceneController.GetComponent <DuelSceneScript> ();
 }
 /// <summary>
 /// Triggers the AI to start loading up and downloading the decklist
 /// ready for the player to play against
 /// </summary>
 /// <param name="duelController">Script that is in the duel scene</param>
 void CommandLoadAI(DuelSceneScript duelController)
 {
     //Load AI assigns the DuelScene script for controlling
     //The AI's interactivity with the UI and player objects
     this.duel_controller = duelController; //Assign controller script
     coroutine_loaddeck   = true;           //Used to control the starting of a coroutine
 }
Exemple #3
0
 void Start()
 {
     glob_audiomanager    = GameObject.FindGameObjectWithTag("audio_manager");
     duelControllerScript = duelController.GetComponent <DuelSceneScript> ();
     optionsOverlayScript = ui_cardOptionsOverlay.
                            GetComponent <DuelCardOptionsOverlay> ();
 }
 void Start()
 {
     //Get the audio manager for playing the button noises when a button
     //is pressed
     glob_audiomanager = GameObject.FindGameObjectWithTag("audio_manager");
     //Get the DuelSceneScript
     duelControllerScript = duelController.GetComponent <DuelSceneScript> ();
     //Also need the Attacking overlay Script for when the Player decides
     //to make an attack
     attackOverlayScript =
         ui_attackOverlay.GetComponent <DuelAttackOverlayScript> ();
 }
Exemple #5
0
        /// <summary>
        /// 检查是否决斗双方都已经初始化完成
        /// </summary>
        public void CheckPlayInit()
        {
            if (myPlayer.IAmReady() && opponentPlayer.IAmReady())
            {
                currentPlayer = startPlayer;

                TimerFunction timerFunction = new TimerFunction();
                timerFunction.SetFunction(1, () =>
                {
                    duelSceneScript = GameObject.Find("Main Camera").GetComponent <DuelSceneScript>();
                    myPlayer.SetHandPanel(myHandCardPanel);
                    opponentPlayer.SetHandPanel(opponentHandCardPanel);
                    StartDuel();
                });

                GameManager.AddTimerFunction(timerFunction);
            }
        }
Exemple #6
0
    void Start()
    {
        //Get my GameManagers and Duel Scene Script
        glob_gamemanager  = GameObject.FindGameObjectWithTag("GameManager");
        glob_audiomanager = GameObject.FindGameObjectWithTag("audio_manager");
        duel_opponent     = GameObject.FindGameObjectWithTag("DUEL_OPPONENT");
        duel_Scene        = duel_SceneController.GetComponent <DuelSceneScript> ();

        //Check the privilages of the logged in account. Admin privilages will
        //display the debug/testing functionality buttons!
        if (glob_gamemanager.GetComponent <AccountController> ().
            LoggedInAccount.Privilages >= 0)
        {
            uibtn_debugShowHand.SetActive(true);
            uibtn_debugShowDeck.SetActive(true);
            uibtn_debugInstantWin.SetActive(true);
        }
    }
 void Start()
 {
     duelControllerScript = duelController.GetComponent <DuelSceneScript> ();
 }
Exemple #8
0
 void Start()
 {
     glob_audiomanager = GameObject.FindGameObjectWithTag("audio_manager");
     duelControlScript = duelController.GetComponent <DuelSceneScript> ();
 }