Inheritance: MonoBehaviour
Exemplo n.º 1
0
    void Start()
    {
        Status();
        playerStock = PlayerData.Instance.playerStock;
        m_vector    = Vector2.zero;
        PlayerData.Instance.SetJobTime = PlayerData.Instance.jobTime;
        m_playerInput      = GetComponent <PlayerInput>();
        cam                = m_mainCamera.GetComponent <Camera>();
        m_rigid2D          = GetComponent <Rigidbody2D>();
        m_playerAnimations = GetComponent <PlayerAnimations>();
        animator           = GetComponent <Animator>();
        MainSpriteRenderer = GetComponent <SpriteRenderer>();
        uiController       = GameObject.Find("UiController").GetComponent <UiController>();
        m_changePlayer     = GameObject.Find("PlayerManager").GetComponent <ChangePlayer>();
        //SoulShot soulShot = m_Soul.GetComponent<SoulShot>();
        PlayerData.Instance.SetJobTime = PlayerData.Instance.jobTime;
        string JobName = m_job.ToString();

        switch (m_job)
        {
        case PlayerJob.GeroZomie:
            uiController.ChangePlayerIcom();
            break;

        //case TagName.gelozombie:
        //uiController.ChangePlayerIcom(gameObject.tag);
        //break;

        default:
            break;
        }

        m_jobTime = PlayerData.Instance.jobTime;
    }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     player        = GameObject.FindGameObjectWithTag("Player").GetComponent <ChangePlayer> ();
     ally          = GameObject.FindGameObjectWithTag("Ally").GetComponent <ChangePlayer> ();
     player.hidden = false;
     ally.hidden   = true;
     counter       = 0;
 }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     rb2d           = GetComponent <Rigidbody2D>();
     targetRenderer = GetComponent <Renderer>();
     player         = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>();
     uiController   = GameObject.Find("UiController").GetComponent <UiController>();
     m_changePlayer = GameObject.Find("PlayerManager").GetComponent <ChangePlayer>();
 }
Exemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent <ChangePlayer>();
     ally   = GameObject.FindGameObjectWithTag("Ally").GetComponent <ChangePlayer>();
     if (player3)
     {
         support = GameObject.FindGameObjectWithTag("Support").GetComponent <ThrowSupport> ();
     }
     player.hidden = false;
     ally.hidden   = true;
     counter       = 0;
 }
Exemplo n.º 5
0
 protected virtual void OnChangePlayer(Player player)
 {
     ChangePlayer?.Invoke(player);
 }