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

        if (orb != null)
        {
            stateMachine.SetState(AimRegionState.Normal);
        }
    }
예제 #2
0
 public NeutralState(EntityStateMachine ownerFiniteStateMachine) : base(ownerFiniteStateMachine)
 {
     Name = "Wander";
     childStateMachine             = new EntityStateMachine(OwnerEntity);
     childStateMachine.ParentState = this;
     childStateMachine.SetState(new SchoolTogetherState(childStateMachine));
 }
예제 #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);
    }
예제 #4
0
 private void StartAim(IOrb orb)
 {
     this.orb = orb;
     stateMachine.SetState(PaddleState.Aiming);
 }
예제 #5
0
 public MovingEntityWithStates()
 {
     BehaviourStateMachine = new EntityStateMachine(this);
     BehaviourStateMachine.SetState(new NeutralState(BehaviourStateMachine));
 }