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(); }
public void setValues(Camera playerCamera, AbstractCharacterInput input) { this.playerCamera = playerCamera.transform; this.characterInput = input; }
private void Awake() { m_BoxCollider = GetComponent <SmartBoxCollider>(); m_Rigidbody2D = GetComponent <Rigidbody2D>(); input = GetComponent <AbstractCharacterInput>(); }