Exemplo n.º 1
0
    private void Awake()
    {
        //init:
        animator = GetComponent <Animator>();
        input    = GetComponent <AbstractCharacterInput>(); if (input == null)
        {
            input = gameObject.AddComponent <AbstractCharacterInput>();
        }
        physics = GetComponent <CharacterPhysics>(); if (physics == null)
        {
            physics = gameObject.AddComponent <CharacterPhysics>();
        }
        view = GetComponent <AbstractCameraController>(); if (view == null)
        {
            view = gameObject.AddComponent <AbstractCameraController>();
        }

        interaction.init();
        ResetAnimatorController();
    }
Exemplo n.º 2
0
 public void setValues(Camera playerCamera, AbstractCharacterInput input)
 {
     this.playerCamera   = playerCamera.transform;
     this.characterInput = input;
 }
Exemplo n.º 3
0
 private void Awake()
 {
     m_BoxCollider = GetComponent <SmartBoxCollider>();
     m_Rigidbody2D = GetComponent <Rigidbody2D>();
     input         = GetComponent <AbstractCharacterInput>();
 }