Esempio n. 1
0
 public Unit(string name, Coords coords, int team)
 {
     this.name= name;
     this.position = coords;
     this.team = team;
     this.maxSlope = 1;
 }
Esempio n. 2
0
 public void MoveTo(Coords loc, double Rotation)
 {
     position = loc;
     rotation = Rotation;
 }
Esempio n. 3
0
 public void MoveTo(int X, int Y, int Z, double Rotation)
 {
     position = new Coords(X,Y,Z);
     rotation = Rotation;
 }
Esempio n. 4
0
 public Effect(Coords start, Coords delta, Texture tex)
 {
 }
Esempio n. 5
0
        public double Direction(Coords Before)
        {
            //ignores y;

            return Math.Atan2( this.Z - Before.Z,this.X- Before.X);
        }
Esempio n. 6
0
        public bool InRange(Coords origin, Coords target)
        {
            bool inRange = false;
            switch(this.Type){
                case WeaponType.PROJECILE:
                //TODO LINE OF SIGHT
                case WeaponType.MELEE:
                case WeaponType.MAGIC:
                inRange =	Math.Abs(target.X- origin.X) <=1 &&
               				Math.Abs(target.Y- origin.Y) <=1 &&
                            Math.Abs(target.Z- origin.Z) <=1;
                break;
                case WeaponType.ORBITAL:
                    inRange =true;
                break;

                }

            return inRange;
        }
Esempio n. 7
0
 public Effect(Coords start,  Texture texture, int howLong)
 {
     position = start;
     maxTime=howLong;
 }