示例#1
0
 // reset state
 public override void Reset()
 {
     base.Reset();             // reset the vehicle
     Speed  = 1.5f;            // speed along Forward direction.
     _trail = new Trail();
     _trail.Clear();           // prevent long streaks due to teleportation
 }
示例#2
0
        // reset state
        public override void Reset()
        {
            base.Reset();             // reset the vehicle
            Speed    = 0.0f;          // speed along Forward direction.
            MaxForce = 3000.7f;       // steering force is clipped to this magnitude
            MaxSpeed = 10;            // velocity is clipped to this magnitude

            // Place me on my part of the field, looking at oponnents goal
            SetPosition(b_ImTeamA ? Utilities.Random() * 20 : -Utilities.Random() * 20, 0, (Utilities.Random() - 0.5f) * 20);
            if (m_MyID < 9)
            {
                if (b_ImTeamA)
                {
                    Position = (Globals.PlayerPosition[m_MyID]);
                }
                else
                {
                    Position = (new Vector3(-Globals.PlayerPosition[m_MyID].X, Globals.PlayerPosition[m_MyID].Y, Globals.PlayerPosition[m_MyID].Z));
                }
            }
            m_home = Position;

            if (trail == null)
            {
                trail = new Trail(10, 60);
            }
            trail.Clear();                // prevent long streaks due to teleportation
        }
 public void Reset()
 {
     Trail.Clear();
     foreach (var x in circles)
     {
         x.Reset();
     }
 }
示例#4
0
 // reset state
 public override void Reset()
 {
     base.Reset();             // reset the vehicle
     Speed    = 1.5f;          // speed along Forward direction.
     MaxForce = 0.3f;          // steering force is clipped to this magnitude
     MaxSpeed = 5;             // velocity is clipped to this magnitude
     trail    = new Trail();
     trail.Clear();            // prevent long streaks due to teleportation
 }
示例#5
0
 // reset state
 public override void Reset()
 {
     base.Reset(); // reset the vehicle
     Speed = 1.5f;         // speed along Forward direction.
     MaxForce = 0.3f;      // steering force is clipped to this magnitude
     MaxSpeed = 5;         // velocity is clipped to this magnitude
     trail = new Trail();
     trail.Clear();    // prevent long streaks due to teleportation
 }
示例#6
0
        public override void Reset()
        {
            base.Reset();

            RandomizeStartingPositionAndHeading();  // new starting position

            _trail = new Trail(7.5f, 600);
            _trail.Clear();
        }
示例#7
0
        // reset state
        public override void Reset()
        {
            base.Reset();                  // reset the vehicle

            Speed    = 0;                  // speed along Forward direction.
            MaxForce = 5.0f;               // steering force is clipped to this magnitude
            MaxSpeed = 3.0f;               // velocity is clipped to this magnitude
            trail    = new Trail();
            trail.Clear();                 // prevent long streaks due to teleportation
            GaudyPursuitAnnotation = true; // select use of 9-color annotation
        }
示例#8
0
        // reset state
        public override void Reset()
        {
            base.Reset();			// reset the vehicle

            Speed = 0;            // speed along Forward direction.
            MaxForce = 5.0f;       // steering force is clipped to this magnitude
            MaxSpeed = 3.0f;       // velocity is clipped to this magnitude
            trail = new Trail();
            trail.Clear();    // prevent long streaks due to teleportation
            GaudyPursuitAnnotation = true; // select use of 9-color annotation
        }
示例#9
0
        // reset state
        public override void Reset()
        {
            base.Reset();             // reset the vehicle
            Speed = 0.0f;             // speed along Forward direction.

            Position = new Vector3(0, 0, 0);
            if (_trail == null)
            {
                _trail = new Trail(100, 6000);
            }
            _trail.Clear();                // prevent long streaks due to teleportation
        }
示例#10
0
        // reset state
        public override void Reset()
        {
            base.Reset();                          // reset the vehicle

            Speed = 3;                             // speed along Forward direction.

            Avoiding = false;                      // not actively avoiding

            RandomizeStartingPositionAndHeading(); // new starting position

            Trail = new Trail();
            Trail.Clear();                 // prevent long streaks due to teleportation
        }
示例#11
0
        // reset state
        public override void Reset()
        {
            base.Reset();             // reset the vehicle
            Speed    = 0.0f;          // speed along Forward direction.
            MaxForce = 9.0f;          // steering force is clipped to this magnitude
            MaxSpeed = 9.0f;          // velocity is clipped to this magnitude

            SetPosition(0, 0, 0);
            if (trail == null)
            {
                trail = new Trail(100, 6000);
            }
            trail.Clear();                // prevent long streaks due to teleportation
        }
示例#12
0
        // reset state
        public override void Reset()
        {
            base.Reset();                          // reset the vehicle

            Speed    = 3;                          // speed along Forward direction.
            MaxForce = 3.0f;                       // steering force is clipped to this magnitude
            MaxSpeed = 3.0f;                       // velocity is clipped to this magnitude

            Avoiding = false;                      // not actively avoiding

            RandomizeStartingPositionAndHeading(); // new starting position

            trail = new Trail();
            trail.Clear();                 // prevent long streaks due to teleportation
        }
示例#13
0
    public void Kill()
    {
        ShakeBehavior.instance.TriggerShake();
        audiomanager.instance.PlayDead();
        int i = Random.Range(0, 4);

        if (i == 3)
        {
            World._instance.spawndeathtile(transform.position);
        }
        transform.position = World.GetRandomPosition();
        Trail trail = GetComponentInChildren <Trail>();

        trail.Clear();

        GetComponent <Movement>().PauseMovement();
    }
示例#14
0
        // reset state
        public override void Reset()
        {
            base.Reset();             // reset the vehicle
            Speed = 0.0f;             // speed along Forward direction.

            // Place me on my part of the field, looking at oponnents goal
            Position = new Vector3(_imTeamA ? RandomHelpers.Random() * 20 : -RandomHelpers.Random() * 20, 0, (RandomHelpers.Random() - 0.5f) * 20);
            if (_myID < 9)
            {
                Position = _imTeamA ? (Globals.PlayerPosition[_myID]) : (new Vector3(-Globals.PlayerPosition[_myID].X, Globals.PlayerPosition[_myID].Y, Globals.PlayerPosition[_myID].Z));
            }
            _home = Position;

            if (_trail == null)
            {
                _trail = new Trail(10, 60);
            }
            _trail.Clear();                // prevent long streaks due to teleportation
        }
 public void AddCircle(Circle c)
 {
     Trail.Clear();
     circles.Add(c);
     checkSlow(c.SpeedAngle);
 }
示例#16
0
 public override void OnSpawn()
 {
     Trail.Clear();
 }
示例#17
0
        // reset state
        public override void Reset()
        {
            base.Reset();  // reset the vehicle

            Speed = 3;             // speed along Forward direction.
            MaxForce = 3.0f;        // steering force is clipped to this magnitude
            MaxSpeed = 3.0f;        // velocity is clipped to this magnitude

            Avoiding = false;         // not actively avoiding

            RandomizeStartingPositionAndHeading();  // new starting position

            trail = new Trail();
            trail.Clear();     // prevent long streaks due to teleportation
        }