public void Initialize() { cachedTransform = base.transform; cachedGameObject = base.gameObject; cachedRenderer = GetComponent <Renderer> (); Abilities = this.GetComponents <Ability> (); AbilityCount = Abilities.Length; ActiveAbilities = new ActiveAbility[InputManager.InputCount]; for (i = 0; i < AbilityCount; i++) { Ability ability = Abilities [i]; ability.Initialize(this); ActiveAbility activeAbility = ability as ActiveAbility; if (activeAbility != null) { ActiveAbilities [(int)activeAbility.ListenInput] = activeAbility; } } if (Body != null) { Body.Initialize(); } }