예제 #1
0
 public BipedalPatrol(UiEnemyFSM fsm, Vector3 pointA, Vector3 pointB) : base(fsm)
 {
     PointA  = pointA;
     PointB  = pointB;
     Current = State.PointA;
     Motion  = new UiMotion(this);
     Motion.Movement.IsConstant = true;
 }
예제 #2
0
        public override void Initialize(IEnemy runtimeData)
        {
            base.Initialize(runtimeData);
            var dataBipedal = Data as BipedalData;
            var pa          = (Vector3)dataBipedal.PointA + transform.parent.position;
            var pb          = (Vector3)dataBipedal.PointB + transform.parent.position;

            Behaviors = new BipedalBehavior(this, pa, pb);
        }
 public BipedalPatrol(UiEnemyFSM fsm, Vector3 pointA, Vector3 pointB) : base(fsm)
 {
     PointA                     = pointA;
     PointB                     = pointB;
     Animator                   = Fsm.Handler.MonoBehaviour.GetComponent <Animator>();
     SpriteRenderer             = Fsm.Handler.MonoBehaviour.GetComponent <SpriteRenderer>();
     Current                    = State.PointA;
     Motion                     = new UiMotion(this);
     Motion.Movement.IsConstant = true;
 }