示例#1
0
        public Character(Entity.EntityType entityType, String name) : base(entityType, name)
        {
            followPosition = Vector2.Zero;
            aiStateMachine = GetAiStateMachine();

            aiStateMachine.Add("FOLLOW_XPATH", new AiState_FollowXPath(this));
            aiStateMachine.Change("FOLLOW_XPATH");
        }
        public AiState_FollowXPath(Entity entity)
        {
            this.entity = entity;
            stateMachine = this.entity.GetAiStateMachine();

            closeDistance = 540f;
            velocity = new Vector2(1.8f, 0f);
        }