private void Awake()
 {
     instance         = this;
     m_allPowerBoxes  = FindObjectsOfType <PowerUp.PowerUpBox>();
     m_UIManager      = FindObjectOfType <UIManager>();
     m_taggingManager = FindObjectOfType <TaggingManager>();
     m_taggingManager.InitializeTaggingManager();
     m_isCountdownRunning = false;
 }
Beispiel #2
0
    // Start is called before the first frame update
    void Start()
    {
        achievementManager = AchievementManager._instance;
        PausedMenu         = PausedMenuManager._instance;
        tutCanvas          = FindObjectOfType <HowToManager>();
        tutCanvas.gameObject.SetActive(false);

        TaggingManager taggingManagerOnMainMenu = FindObjectOfType <TaggingManager>();

        if (taggingManagerOnMainMenu)
        {
            taggingManagerOnMainMenu.InitializeTaggingManager();
        }
    }
Beispiel #3
0
        private void Start()
        {
            m_playerTaggingIdentifier = GetComponent <TaggingIdentifier>();
            m_taggingManager          = FindObjectOfType <TaggingManager>();
            m_boppableInterface       = GetComponent <IBoppable>();
            m_UIManager = FindObjectOfType <UIManager>();

            if (this.tag == "Player")
            {
                m_isPlayer = true;
            }

            if (m_isPlayer)
            {
                m_UIManager.UpdatePowerUpUI(slot1, slot2);
            }

            superSpeedTrail.SetActive(false);
        }
Beispiel #4
0
    public override void OnInspectorGUI()
    {
        TaggingIdentifier[] identifiers    = FindObjectsOfType <TaggingIdentifier>();
        TaggingManager      taggingManager = FindObjectOfType <TaggingManager>();

        base.DrawDefaultInspector();

        GUILayout.Space(10);
        GUIStyle gStyle = new GUIStyle();

        gStyle.normal.background = MakeTex(200, 50, Color.gray);
        GUILayout.BeginHorizontal(gStyle);
        GUILayout.Label("Player Name", GUILayout.Width(200));
        GUILayout.Label("Player ID", GUILayout.Width(75));
        GUILayout.Label("Is It?", GUILayout.Width(50));
        GUILayout.Label("Time as It", GUILayout.Width(75));
        GUILayout.EndHorizontal();

        foreach (TaggingIdentifier identifier in identifiers)
        {
            bool isIt = identifier.PlayerIdentifier == taggingManager.WhoIsKing;

            if (isIt)
            {
                gStyle.normal.background = MakeTex(200, 50, Color.red);
            }
            else
            {
                gStyle.normal.background = MakeTex(200, 50, Color.green);
            }

            GUILayout.BeginHorizontal(gStyle);
            GUILayout.Label(identifier.gameObject.name, GUILayout.Width(200));
            GUILayout.Label(identifier.PlayerIdentifier.ToString(), GUILayout.Width(75));
            GUILayout.Label(isIt.ToString(), GUILayout.Width(50));
            GUILayout.Label(identifier.AmountOfTimeAsKing.ToString(), GUILayout.Width(75));
            GUILayout.EndHorizontal();
        }

        GUILayout.Space(10);
    }