private void Awake() //run on game load (before start) { CharacterController = GetComponent("CharacterController") as CharacterController; thisMotor = this.GetComponent("SmashCharacterMotor") as SmashCharacterMotor; player = GetComponent <PlayerCharacter>(); player.setName(this.name); Debug.Log(CharacterController); Debug.Log(thisMotor); Instance = this; checkStates(); }
// Use this for initialization void Start() { animator = transform.GetComponent <Animator>(); animator = transform.GetComponentInChildren <Animator>(); pController = GetComponent("SmashCharacterController") as SmashCharacterController; }
// void Awake() { Instance = this; thisCharacterController = GetComponent("SmashCharacterController") as SmashCharacterController; thisActualCharacterController = GetComponent("CharacterController") as CharacterController; }