Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        _livesLeft = LIVES;
        _ball = GameObject.Find("Ball");
        _ballController = _ball.GetComponent<BallController>();

        _globalObject = GameObject.Find("Global Controller");
        _globalController = _globalObject.GetComponent<GlobalController>();
    }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     _invisible = false;
     _mainCollider = GetComponent<BoxCollider>();
     Screen.showCursor = false;
     _globalObj = GameObject.Find("Global Controller");
     _globalController = _globalObj.GetComponent<GlobalController>();
     _ball = GameObject.Find("Ball");
     _ballController = _ball.GetComponent<BallController>();
 }
Exemplo n.º 3
0
    void Awake()
    {
        if (instance != null && instance != this) {
            isSetToDestroy = true;
            Destroy(gameObject);
        } else {
            instance = this;
        }

        eventRegistery = GetComponentInChildren<EventRegistery>();
        saveFile = GetComponentInChildren<SaveFile>();
        systemFile = GetComponentInChildren<SystemFile>();
        dataFile = GetComponentInChildren<DataFile>();
        transitionery = GetComponentInChildren<TransitionManager>();
        view = GetComponentInChildren<GlobalView>();
    }
 public static void SetUp()
 {
     GlobalController.test = true;
     GlobalController.Initialize();
 }
 public static void BeforeEveryTest()
 {
     GlobalController.test = true;
     GlobalController.Initialize();
 }
Exemplo n.º 6
0
 protected void SaveObjectState()
 {
     GlobalController.SavePersistentObject(this.MakeSerialized());
 }
 // Use this for initialization
 void Start()
 {
     globalController = GameObject.FindGameObjectWithTag(TagNames.GlobalController).GetComponent <GlobalController>();
 }
Exemplo n.º 8
0
 public void MovePlayerToEffectPoint()
 {
     GlobalController.MovePlayerTo(effectPoint.position);
 }
Exemplo n.º 9
0
 public void ExitSlowMotion()
 {
     GlobalController.ExitSlowMotion();
 }
Exemplo n.º 10
0
 public void FlashWhite()
 {
     GlobalController.FlashWhite();
 }
Exemplo n.º 11
0
 void Awake()
 {
     pGlobal = this;
 }
Exemplo n.º 12
0
 public override void OnPlayerEnter()
 {
     GlobalController.LoadScene(sceneToLoad, beacon: beacon);
 }
Exemplo n.º 13
0
 public void SetGlobalController(GlobalController glob)
 {
     globalController = glob;
 }
Exemplo n.º 14
0
    private void Update()
    {
        if (doTheCleanup)
        {
            var clientDictionary = ClientScene.objects;

            GameObject playerOne = null;
            GameObject playerTwo = null;
            foreach (var item in clientDictionary)
            {
                Debug.Log("Key: " + item.Key + " Value: " + item.Value);
                if (item.Value.name.Equals("Player1") || item.Value.name.Equals("player1(Clone)"))
                {
                    playerOne = item.Value.gameObject;
                }
                if (item.Value.name.Equals("Player2") || item.Value.name.Equals("player2(Clone)"))
                {
                    playerTwo = item.Value.gameObject;
                }
            }

            var playerScriptOne = (TriggerScript)playerOne.GetComponent <TriggerScript>();
            playerScriptOne.DoTheCleanup();

            var playerScriptTwo = (TriggerScript)playerTwo.GetComponent <TriggerScript>();
            playerScriptTwo.DoTheCleanup();

            doTheCleanup = false;
        }

        if (globalController == null && ClientScene.objects.Count != 0)
        {
            globalController = (GlobalController)GameObject.Find("GlobalControllerGameObject").GetComponent <GlobalController>();
        }

        if (ClientScene.objects.Count == 4 && !firstCheck)
        {
            var clientDictionary = ClientScene.objects;

            GameObject playerOne = null;
            GameObject playerTwo = null;
            foreach (var item in clientDictionary)
            {
                //Debug.Log("Key: " + item.Key + " Value: " + item.Value);
                if (item.Value.name.Equals("Player1") || item.Value.name.Equals("player1(Clone)"))
                {
                    playerOne = item.Value.gameObject;
                }
                if (item.Value.name.Equals("Player2") || item.Value.name.Equals("player2(Clone)"))
                {
                    playerTwo = item.Value.gameObject;
                }
            }

            var playerScriptOne = (TriggerScript)playerOne.GetComponent <TriggerScript>();
            playerScriptOne.ThisIsYourGlobal(globalController);

            var playerScriptTwo = (TriggerScript)playerTwo.GetComponent <TriggerScript>();
            playerScriptTwo.ThisIsYourGlobal(globalController);

            globalController.ClientCheckedInTrigger();
            globalController.ClientCheckedInTrigger();

            firstCheck = true;
        }
    }
Exemplo n.º 15
0
 public void QuitGame()
 {
     GlobalController.SaveFile();
     Application.Quit();
 }
Exemplo n.º 16
0
 public void NewGame()
 {
     GlobalController.currentLevel = 0;
     GlobalController.SaveFile();
     SceneManager.LoadScene("TalkingScene");
 }
Exemplo n.º 17
0
 override public void Activate()
 {
     GlobalController.SaveGame(true);
 }
Exemplo n.º 18
0
    int tmp            = 0; //used to manipulate velocity

    void Start()
    {
        gc  = FindObjectOfType <GlobalController>();
        obj = GetComponent <BaseObject>();
        rb  = GetComponent <Rigidbody2D>();
    }
Exemplo n.º 19
0
 public void CutsceneCallback()
 {
     GlobalController.CutsceneCallback();
 }
Exemplo n.º 20
0
 override protected bool Check()
 {
     return(GlobalController.HasState(state));
 }
Exemplo n.º 21
0
 public void EnterSlowMotion()
 {
     GlobalController.EnterSlowMotion();
 }
Exemplo n.º 22
0
 public override void OnPlayerEnter()
 {
     GlobalController.ShowTitleText(title, subtitle);
 }
Exemplo n.º 23
0
 public void ShowTitle(string text)
 {
     string[] splitText = text.Split('/');
     GlobalController.ShowTitleText(splitText[0], splitText[1]);
 }
Exemplo n.º 24
0
 public void SetGlobalControllerRef(GlobalController global, WinningOptions opts)
 {
     globalController = global;
     winOpts          = opts;
 }
Exemplo n.º 25
0
 public void GameFlag(GameFlag flag)
 {
     GlobalController.AddGameFlag(flag);
 }
Exemplo n.º 26
0
 void ClosePage()
 {
     gameObject.SetActive(false);
     GlobalController.setState(GameState.GS_STARTMENU);
 }
Exemplo n.º 27
0
 protected SerializedPersistentObject LoadObjectState()
 {
     return(GlobalController.GetPersistentObject(GetID()));
 }
Exemplo n.º 28
0
 // Use this for initialization
 void Start()
 {
     MyGlobalController = GameObject.Find("GlobalController").GetComponent <GlobalController>();
     MyGlobalController.MyGridControllerScript.StartMe();
 }
 public static void AfterEveryTest()
 {
     SqliteConnection.ClearAllPools();
     GlobalController.DropAll();
 }
Exemplo n.º 30
0
 private void Awake()
 {
     gc = FindObjectOfType <GlobalController>();
 }
Exemplo n.º 31
0
 public static void SetDefaultUser(this GlobalController controller)
 {
     controller.CurrentCedUser = new CedUser(new UserEntity {
         Email = "*****@*****.**"
     }, new List <RoleEntity>());
 }
Exemplo n.º 32
0
 public void LoadScene(string sceneName)
 {
     GlobalController.LoadScene(sceneName);
 }
Exemplo n.º 33
0
 public static void DepartWithPlayer()
 {
     GlobalController.LoadSceneWithSubway(GetStopScene(destination));
 }
Exemplo n.º 34
0
    // Use this for initialization
    void Start()
    {
        currentScore = GameObject.Find("CurrentScore").GetComponent<CurrentScore>();
        fullScore = GameObject.FindObjectOfType<FullScore>();
        score = GetComponent<Score>();
        energy = GetComponent<Energy>();
        energyLine = GameObject.FindObjectOfType<EnergyLine>();
        inputController = GameObject.FindObjectOfType<InputController>();
        timerScript = GameObject.FindObjectOfType<TimerScript>();
        timerUI = GameObject.FindObjectOfType<TimerUI>();
        info = GetComponent<Info>();
        taskStrings = GetComponent<TaskStrings>();
        pauseButton = GameObject.FindObjectOfType<PauseButton>().gameObject;
        pauseMenu = GameObject.Find("Canvas").GetComponentInChildren<PauseMenu>();
          //  endMenu = GameObject.FindObjectOfType<EndMenu>();
        taskHelper = GameObject.FindObjectOfType<TaskHelper>();
        globalController = GetComponent<GlobalController>();
        cam = GameObject.Find("MainCamera");
        secondCamera = GameObject.Find("SecondCamera");
        wordRideCanvas = GameObject.FindObjectOfType<WordRideCanvas>();

        metalSparksPrefab = Resources.Load("Prefabs/Particles/MetalSpark") as GameObject;
        carUserParametres = GetComponent<CarUserParametres>();
        gameUI = GameObject.FindObjectOfType<GameUI>();
        canvasController = GameObject.FindObjectOfType<CanvasController>();

        particleCanvas = GameObject.Find("ParticleCanvas");
        carCreator = GameObject.FindObjectOfType<CarCreator>();

        mainBonus = GameObject.FindObjectOfType<MainBonus>();

        waitBackground = GameObject.FindObjectOfType<WaitBackground>();
    }