Example #1
0
    private void OnTriggerExit2D(Collider2D collision)
    {
        IOrb orb = collision.AsOrb();

        if (orb != null)
        {
            stateMachine.SetState(AimRegionState.Normal);
        }
    }
Example #2
0
 public NeutralState(EntityStateMachine ownerFiniteStateMachine) : base(ownerFiniteStateMachine)
 {
     Name = "Wander";
     childStateMachine             = new EntityStateMachine(OwnerEntity);
     childStateMachine.ParentState = this;
     childStateMachine.SetState(new SchoolTogetherState(childStateMachine));
 }
Example #3
0
    public override void OnBump(IOrb orb, Vector2 collisionPoint)
    {
        if (orb.Owner != null)
        {
            orb.Owner.GainUltCharge(points, Position);
        }

        manager.OnBeeHit(this);
        stateMachine.SetState(BeeState.Hit);
    }
Example #4
0
 private void StartAim(IOrb orb)
 {
     this.orb = orb;
     stateMachine.SetState(PaddleState.Aiming);
 }
Example #5
0
 public MovingEntityWithStates()
 {
     BehaviourStateMachine = new EntityStateMachine(this);
     BehaviourStateMachine.SetState(new NeutralState(BehaviourStateMachine));
 }