Ejemplo n.º 1
0
 public MoverSim(MoverEntity mover)
     : base()
 {
     this.mover         = mover;
     this.MovementState = UnitMovementState.IDLE;
     this.PayloadState  = UnitPayloadState.EMPTY;
     ReachedGoal        = true;
     RefreshTarget      = true;
     ManualControl      = false;
 }
Ejemplo n.º 2
0
        public Entities.MoverEntity CreateMover(Vector3 location)
        {
            Entities.MoverEntity mover = new Entities.MoverEntity(this.RunningGameSession);
            mover.projectionMatrix = this.projectionMatrix;
            int height = this.RunningGameSession.LODMap.getCellHeightFromWorldCoor(location.X, location.Z);

            mover.location = new Vector3(location.X, height, location.Z);
            mover.scale    = new Vector3(5.0f, 5.0f, 5.0f);
            mover.UpdateBoundingBox();
            //mover.ShowBoundingBox = true;
            this.Movers.Add(mover);
            this.RunningGameSession.simulator.AddEntity(mover);
            return(mover);
        }