예제 #1
0
파일: mainPlayer.cs 프로젝트: Gkeane12/Gp3
        public mainPlayer(Vector3 Pos, Vector2 centre, float aspectRatio)
            : base(Pos)
        {
            currentlyEquipped = Weapons.none;

            for (int i = 0; i < bulletlist.Length; i++)
            {
                bulletlist[i] = new Bullet(Pos,100.0f);
                bulletlist[i].Active = false;
            }
            shortRange = new Bullet(Pos, 20.0f);
            LongRange = new Bullet(Pos, 1000.0f);
            shortRange.Active = false;
            LongRange.Active = false;
            available = Weapons.none;

            eyes = new Camera(Pos, Vector3.Zero, Vector3.Up, centre);
            eyes.setPerspectiveProjection(45.0f, aspectRatio, 2.0f, 1000.0f);
        }
예제 #2
0
파일: Physics.cs 프로젝트: Gkeane12/Gp3
 /// <summary>
 /// Add bullets to the collidable list
 /// </summary>
 /// <param name="bullet"></param>
 /// <param name="No"></param>
 public void addBullets(Bullet bullet, int No)
 {
     Bullets[No] = new BoundingSphere(bullet.Position, bullet.charModel.Meshes[0].BoundingSphere.Radius * 1.0f);
 }