Add basic radar and weapon
This commit is contained in:
@@ -3,6 +3,8 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Microsoft.Xna.Framework;
|
||||
using SynthySound;
|
||||
using EvilSatellites.Screens;
|
||||
using EvilSatellites.Weapons;
|
||||
|
||||
namespace EvilSatellites.Objects
|
||||
{
|
||||
@@ -13,6 +15,7 @@ namespace EvilSatellites.Objects
|
||||
private Vector3 Deceleration = new Vector3(0.005f, 0.005f, 0.005f);
|
||||
private ISoundEffect sfxEngine;
|
||||
private ISoundEffect sfxWhine;
|
||||
public IWeapon CurrentWeapon;
|
||||
public Player(IScreen screen): base(screen)
|
||||
{
|
||||
Type = ObjectType.Player;
|
||||
@@ -21,6 +24,7 @@ namespace EvilSatellites.Objects
|
||||
Movement = new Vector3(0, 0, 0);
|
||||
Rotation = Matrix.Identity;
|
||||
Orientation = Rotation.Forward;
|
||||
CurrentWeapon = new LaserMG(this, Screen);
|
||||
Activate();
|
||||
}
|
||||
|
||||
@@ -43,6 +47,7 @@ namespace EvilSatellites.Objects
|
||||
}
|
||||
override public void Update(GameTime gameTime)
|
||||
{
|
||||
CurrentWeapon.Update(gameTime);
|
||||
Move(Movement);
|
||||
sfxEngine.Pitch = 0.5 + (Movement.Length() / MaxSpeed.Length()) * 4;
|
||||
sfxWhine.Pitch = 0.5 + (Movement.Length() / MaxSpeed.Length()) * 1;
|
||||
|
||||
Reference in New Issue
Block a user