private void Awake()
    {
        m_Motor       = GetComponent <PlatformMotor2D>();
        m_InputDriver = GetComponent <BaseInputDriver>();

        if (m_InputDriver == null)
        {
            Debug.LogWarning("An InputDriver is needed for a PlatformController2D");
        }
    }
 //--------Métodos API--------
 private void Awake()
 {
     foreach (Transform child in transform)
     {
         if (child.tag == "Slash")
         {
             slashObject = child.gameObject;
         }
     }
     animator          = slashObject.GetComponent <Animator>();
     slashChildren     = slashObject.transform;
     playerOrientation = this.GetComponentInParent <SpriteRenderer>();
     playerController  = this.GetComponent <PlatformMotor2D>();
 }
Beispiel #3
0
 //-------Metodos API-------
 //Initialization
 private void Awake()
 {
     spriteRenderer = this.GetComponent <SpriteRenderer>();
     animator       = this.GetComponent <Animator>();
     playerMotor    = this.GetComponent <PlatformMotor2D>();
 }