Exemplo n.º 1
0
 void Awake()
 {
     fogCtrl     = GetComponent <DarknessFogControl>();
     netManCtrl  = GetComponent <NetworkManagerControl>();
     lvlCrtrCtrl = GetComponent <LevelCreatorControl>();
     mapMstr     = GameObject.Find("LevelLoadingControl").GetComponent <MapMaster>();
 }
Exemplo n.º 2
0
 //UNITY FUNCTIONS
 void OnLevelWasLoaded(int level)
 {
     if (Application.loadedLevelName.Equals("ManFight"))
     {
         netManCtrl = GameObject.Find("GameScripts").GetComponent <NetworkManagerControl>();
         netManCtrl.SetPlayer(this, netView.owner.guid);
     }
 }
Exemplo n.º 3
0
    void Awake()
    {
        lvlCtrl  = GetComponent <LevelControl>();
        camCtrl  = GetComponent <CameraControl>();
        playCtrl = GetComponent <PlayoutControl>();

        netManCtrl = GetComponent <NetworkManagerControl>();
        rCmdCtrl   = GetComponent <RobotCommandControl>();
    }
Exemplo n.º 4
0
    void Awake()
    {
        gameCtrl   = GetComponent <GameControl>();
        netManCtrl = GetComponent <NetworkManagerControl>();
        rCmdCtrl   = GetComponent <RobotCommandControl>();
        lvlCtrl    = GetComponent <LevelControl>();

        guiCanvas = GameObject.Find("GUICanvas").transform;
        foreach (Transform child in guiCanvas)
        {
            if (child.name.Equals("CurrRobotPanel"))
            {
                robotPanel = child;

                foreach (Transform gChild in child)
                {
                    if (gChild.name.Equals("MovesLeftText"))
                    {
                        movesLeftText = gChild.GetComponent <Text>();
                    }
                    else if (gChild.name.Equals("RobotNameText"))
                    {
                        robotNameText = gChild.GetComponent <Text>();
                    }
                    else if (gChild.name.Equals("ShootModeButton"))
                    {
                        shootModeButton = gChild.GetComponent <Button>();
                    }
                }
            }
            else if (child.name.Equals("GeneralInfoPanel"))
            {
                generalInfoPanel = child;

                foreach (Transform gChild in child)
                {
                    if (gChild.name.Equals("TurnText"))
                    {
                        turnText = gChild.GetComponent <Text>();
                    }
                }
            }
            else if (child.name.Equals("RobotPlacingPanel"))
            {
                robotPlacingPanel = child;
                foreach (Transform gChild in robotPlacingPanel)
                {
                    if (gChild.name.Equals("FirstRobotPosition"))
                    {
                        firstRobotPosition = gChild;
                    }
                }
            }
        }

        robotPanel.gameObject.SetActive(false);
    }