示例#1
0
 public TankTurret(Game game, Camera camera, GameLogic gameLogic) : base(game, camera)
 {
     PlayerRef = gameLogic.PlayerRef;
     Barral    = new ModelEntity(game, camera);
     ShotTimer = new Timer(game, 4.1f);
     TankShot  = new Shot(game, camera);
 }
示例#2
0
        ModelEntity InitiateLetter(int letter)
        {
            ModelEntity letterModel = new ModelEntity(Game, TheCamera, WordXNAModels[letter]);

            letterModel.Moveable   = false;
            letterModel.ModelScale = new Vector3(Scale);

            return(letterModel);
        }
示例#3
0
        public TankTred(Game game, Camera camera) : base(game)
        {
            CameraRef      = camera;
            AnimationTimer = new Timer(game, 0.1f);

            for (int i = 0; i < 2; i++)
            {
                TredAnimations[i] = new ModelEntity(game, camera);
                TredAnimations[i].PO.AddAsChildOf(this, false, true);
            }
        }
示例#4
0
 public void BeginRun()
 {
     for (int i = 0; i < Houses.Length; i++)
     {
         Houses[i]              = new ModelEntity(Game, CameraRef, HouseModel);
         OpenHouses[i]          = new ModelEntity(Game, CameraRef, HouseOpenModel);
         Houses[i].Position     = new Vector3(StartX - (i * DistanceBetween), Height, 0);
         Houses[i].PO.Radius    = 15;
         OpenHouses[i].Position = Houses[i].Position;
         OpenHouses[i].Enabled  = false;
     }
 }
示例#5
0
        ModelEntity InitiateNumber(int number)
        {
            if (number < 0)
            {
                number = 0;
            }

            ModelEntity digit = new ModelEntity(Game, TheCamera, NumberModels[number]);

            digit.Moveable   = false;
            digit.ModelScale = new Vector3(Scale);
            digit.PO.AddAsChildOf(this);

            return(digit);
        }
示例#6
0
        public override void BeginRun()
        {
            SetModel(PersonManModel);

            for (int i = 0; i < 2; i++)
            {
                Arms[i] = new ModelEntity(Game, CameraRef, PersonArmModel);
                Legs[i] = new ModelEntity(Game, CameraRef, PersonLegModel);
                Arms[i].AddAsChildOf(this);
                Legs[i].AddAsChildOf(this);
                Arms[i].PO.Position.Y = 3.5f;
                Legs[i].PO.Position.Y = 0;
            }

            Arms[0].PO.Position.X = -1.5f;
            Arms[1].PO.Position.X = 1.5f;

            Legs[0].PO.Position.X = -0.5f;
            Legs[1].PO.Position.X = 0.5f;

            Enabled = false;

            base.BeginRun();
        }
示例#7
0
 void RemoveNumber(ModelEntity numberE)
 {
     NumberEntities.Remove(numberE);
 }