示例#1
0
        public void AI(World W)
        {
            if (!_runDeath) {
                IEntity pe = W.GetPlayer();

                Vector3 delta = Vector3.Multiply(Vector3.Normalize(Vector3.Subtract(pe.Pos, _pos)), PlayerEntity.MOVE_SPEED * 0.9f);
                ApplyForce(delta);
                Yaw = (float)Math.Atan2(delta.X, delta.Z);
            }
            if (Health < 0) {
                if (!_runDeath)
                    W.BuggerDied();
                _noclip = true;
                _runDeath = true;
            }
        }