Ejemplo n.º 1
0
 private Command _GenerateFireCommand(bool startShoot)
 {
     Command com = new Command(startShoot ? StartShootCode : EndShootCode, this.Agent.Controller.ControllerID);
     if (startShoot) {
         com.Add<DefaultData> (new DefaultData(DataType.Int,LockstepManager.FrameCount));
     }
     return com;
 }
Ejemplo n.º 2
0
        public Command GenerateTurnCommand(Vector3 forwards)
        {
            Command com = new Command(this.Data.ListenInputID, this.Agent.Controller.ControllerID);
            Vector3d vecHeight = new Vector3d(forwards);
            com.Add<Vector3d>(vecHeight);
            return com;

        }
Ejemplo n.º 3
0
        public bool GenerateFireCommand(bool startShoot, out Command com)
        {
            if (startShoot)
            {
                com = _GenerateFireCommand(true);
                com.Add<DefaultData> (new DefaultData(DataType.UInt,CurrentShotID));
                LSProjectile projectile = ProjectileManager.NDCreateAndFire (
                    this.ProjCode,
                    ProjectileStartPosition,
                    Turner.GenerateForwards(Turner.CameraController.transform.rotation));

                LatencyProjectiles.Add(CurrentShotID,projectile);
                CurrentShotID++;
                return true;
            } else
            {
                if (ShootType == ShootType.Chain)
                {
                    com = _GenerateFireCommand(false);
                    return true;
                }
            }
            com = null;

            return false;
        }