private void OnTriggerExit2D(Collider2D collision) { IOrb orb = collision.AsOrb(); if (orb != null) { stateMachine.SetState(AimRegionState.Normal); } }
public NeutralState(EntityStateMachine ownerFiniteStateMachine) : base(ownerFiniteStateMachine) { Name = "Wander"; childStateMachine = new EntityStateMachine(OwnerEntity); childStateMachine.ParentState = this; childStateMachine.SetState(new SchoolTogetherState(childStateMachine)); }
public override void OnBump(IOrb orb, Vector2 collisionPoint) { if (orb.Owner != null) { orb.Owner.GainUltCharge(points, Position); } manager.OnBeeHit(this); stateMachine.SetState(BeeState.Hit); }
private void StartAim(IOrb orb) { this.orb = orb; stateMachine.SetState(PaddleState.Aiming); }
public MovingEntityWithStates() { BehaviourStateMachine = new EntityStateMachine(this); BehaviourStateMachine.SetState(new NeutralState(BehaviourStateMachine)); }