//Get references to all necessary components; void Awake() { mover = GetComponent <Mover>(); tr = transform; characterInput = GetComponent <CharacterInput>(); ceilingDetector = GetComponent <CeilingDetector>(); if (characterInput == null) { Debug.LogWarning("No character input script has been attached to this gameobject", this.gameObject); } Setup(); }
//Get references to all necessary components; void Awake() { mover = GetComponent <Mover>(); tr = transform; if (Manager.instance.GlobalUsePad) { characterInput = GetComponent <CharacterPadInput>(); } else if (!Manager.instance.GlobalUsePad) { characterInput = GetComponent <CharacterPadInput>(); } ceilingDetector = GetComponent <CeilingDetector>(); if (characterInput == null) { Debug.LogWarning("No character input script has been attached to this gameobject", this.gameObject); } Setup(); }
// Use this for initialization void Start() { tr = transform; mover = GetComponent <Mover>(); characterInput = GetComponent <CharacterInput>(); }