protected new void Awake() { base.Awake(); (_coll = GetComponent <CircleCollider2D>()).enabled = false; (_rend = GetComponent <SpriteRenderer>()).enabled = false; CooldownTimer = 2.5f; this.DoActionInNextFrame(() => { if (Holder.gameObject == ControlBase.PlayerGameObject) { _directionGUI = BasicLib.InstantiatePrefabTr("gui/" + typeof(DirectionInterface).Name, transform).GetComponent <DirectionInterface>(); _directionGUI.gameObject.SetActive(false); _directionGUI.transform.localScale = new Vector3(0.15f, 0.15f); } }); AttackOnAirState s1 = new AttackOnAirState(_ASM, this); ChagnedDirectionState s2 = new ChagnedDirectionState(_ASM, this); s1.SetTargetStates(s2); _ASM.InitializeWithStates(new InactiveEnabledDisableAttackState(_ASM, this), s1); ClearCooldown(); }
private static DialogueComponent SetDialogue(this BaseCharacterControl mainSpeaker) { return(BasicLib.InstantiatePrefabTr("chatObject", mainSpeaker.MoveComponent.transform).GetComponent <DialogueComponent>()); }