/// <summary> /// Call this method on creating our yukari mechanics to properly setup Isis /// </summary> /// <param name="associatedYukariMechanics"></param> public void SetupIsis(YukariMechanics associatedYukariMechanics) { this.associatedYukariMechanics = associatedYukariMechanics; this.isisContainer = this.transform.parent; this.isisAnim = GetComponent <Animator>(); this.isisAnimSpeedController = GetComponent <AnimationSpeedController>(); this.projectileInteractionHandler = GetComponent <ProjectileInteractionHandler>(); this.gameObject.SetActive(false);//Turn off isis on start }
protected virtual void Awake() { MovementMechanics = GetComponent <MovementMechanics>(); CommandInterpreter = GetComponent <CommandInterpreter>(); CharacterInteractionHandler = GetComponent <CharacterInteractionHandler>(); CharacterSpriteRenderer = GetComponentInChildren <SpriteRenderer>(); Anim = GetComponent <Animator>(); AnimationSpeedController = GetComponent <AnimationSpeedController>(); CurrentHealth = MaxHealth; SpecialMeter = MaxSpecialMeter / 2f; Anim.SetInteger(SpecialMeterParameter, (int)(SpecialMeter / SpecialMeterStockCount)); SetCharacterShouldMove(true); OnCharacterHealthChanged.Invoke(); }
void Start() { root = GameObject.Find("root"); animationSpeedController = root.GetComponent <AnimationSpeedController>(); }