Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        if (characterType == null)
        {
            characterType = GetComponent <MindControlType>();
        }

        ph = GameObject.Find("PlayHud").transform.GetComponent <HUDstate>();
        if (characterType.GetComponent <MindControlType>())
        {
            ph.Hypno();
        }
        else if (characterType.GetComponent <TeleportType>())
        {
            ph.Teleport();
        }
        else if (characterType.GetComponent <BrawlerType>())
        {
            ph.Hypno();
        }
        else if (characterType.GetComponent <GunnerType>())
        {
            ph.Hypno();
        }


        animator = GetComponent <Animator>();
        speed    = characterType.GetMoveSpeed() + GlobalMoveSpeed.GetSpeedDelta();
        prevPos  = transform.position;
        hp       = characterType.GetHP();
        if (name != null)
        {
            name.text = characterType.name;
        }
    }
Ejemplo n.º 2
0
 public void ActiveGameState(HUDstate state)
 {
     if (state == HUDstate.Menu)
     {
         MainMenuPanel.SetActive(true);
         MainGame.SetActive(false);
         GameOverPanel.SetActive(false);
         //SettingPanel.SetActive(false);
     }
     //else if (state == HUDstate.selection)
     //{
     //    SettingPanel.SetActive(true);
     //    MenuPanel.SetActive(false);
     //    MainPanel.SetActive(false);
     //}
     else if (state == HUDstate.Game)
     {
         MainGame.SetActive(true);
         MainMenuPanel.SetActive(false);
         //SettingPanel.SetActive(false);
     }
     else
     {
         GameOverPanel.SetActive(true);
     }
 }
Ejemplo n.º 3
0
    void UpdateUI()
    {
        ph = GameObject.Find("PlayHud").transform.GetComponent <HUDstate>();

        if (GetComponent <MindControlType>())
        {
            ph.Hypno();
        }
        else if (GetComponent <TeleportType>())
        {
            ph.Teleport();
        }
        else if (GetComponent <BrawlerType>())
        {
            ph.Puncher();
        }
        else if (GetComponent <GunnerType>())
        {
            ph.Shooter();
        }


        ph.blinking = !GetComponent <CharacterType>().neutral;
        health.text = hp + "";
    }
Ejemplo n.º 4
0
 private void ActiveGameState(HUDstate state)
 {
     if (state == HUDstate.Menu)
     {
         MenuPanel.SetActive(true);
         //MainPanel.SetActive(false);
         GameOverPanel.SetActive(false);
         SettingPanel.SetActive(false);
     }
     else if (state == HUDstate.Game)
     {
         MainPanel.SetActive(true);
         MenuPanel.SetActive(false);
         SettingPanel.SetActive(false);
     }
     else if (state == HUDstate.Settings)
     {
         MenuPanel.SetActive(false);
         MainPanel.SetActive(false);
         GameOverPanel.SetActive(false);
         SettingPanel.SetActive(true);
     }
     else
     {
         GameOverPanel.SetActive(true);
     }
 }
Ejemplo n.º 5
0
    public void ActiveGameState(HUDstate state)
    {
        if (state == HUDstate.Menu)
        {
            MenuPanel.SetActive(true);

            GameOverPanel.SetActive(false);
        }

        else if (state == HUDstate.Game)
        {
            Maingame.SetActive(true);
            MenuPanel.SetActive(false);
        }
        else if (state == HUDstate.GameOver)
        {
            GameOverPanel.SetActive(true);
            Maingame.SetActive(false);
        }
    }