예제 #1
0
 public void Attacking(Actor self, Target target, Armament a, Barrel barrel)
 {
     --charges;
     timeToRecharge = info.ReloadTime;
 }
예제 #2
0
 public void Attacking(Actor self, Target target, Armament a, Barrel barrel)
 {
     --charges;
     timeToRecharge = info.ReloadTime;
 }
예제 #3
0
파일: Combat.cs 프로젝트: Iran/ClassicRA
        // gets the screen-space position of a barrel.
        public static PVecInt GetBarrelPosition(Actor self, IFacing facing, Turret turret, Barrel barrel)
        {
            var turreted = self.TraitOrDefault<Turreted>();

            if (turreted == null && facing == null)
                return PVecInt.Zero;

            var turretFacing = turreted != null  ? turreted.turretFacing : facing.Facing;

            return GetTurretPosition(self, facing, turret) + barrel.ScreenSpaceOffset
                + (PVecInt)(PVecFloat)Util.RotateVectorByFacing(barrel.TurretSpaceOffset.ToFloat2(), turretFacing, .7f);
        }
예제 #4
0
 public void Attacking(Actor self, Target target, Armament a, Barrel barrel)
 {
     Uncloak();
 }
예제 #5
0
 public void Attacking(Actor self, Target target, Armament a, Barrel barrel)
 {
     --charges;
     timeToRecharge = self.Info.Traits.Get <AttackTeslaInfo>().ReloadTime;
 }
예제 #6
0
 public void Attacking(Actor self, Target target, Armament a, Barrel barrel)
 {
     TakeAmmo();
 }
예제 #7
0
파일: Spy.cs 프로젝트: xbayrockx/OpenRA
 /* lose our disguise if we attack anything */
 public void Attacking(Actor self, Target target, Armament a, Barrel barrel)
 {
     DropDisguise();
 }
예제 #8
0
 public void Attacking(Actor self, Target target, Armament a, Barrel barrel)
 {
     DisguiseAs(self, null);
 }
예제 #9
0
 // gets the screen-space position of a barrel.
 public static PVecInt GetBarrelPosition(Actor self, IFacing facing, Turret turret, Barrel barrel)
 {
     return GetTurretPosition(self, facing, turret) + barrel.ScreenSpaceOffset
         + GetUnitspaceBarrelOffset(self, facing, turret, barrel);
 }
예제 #10
0
        static PVecInt GetUnitspaceBarrelOffset(Actor self, IFacing facing, Turret turret, Barrel barrel)
        {
            var turreted = self.TraitOrDefault<Turreted>();
            if (turreted == null && facing == null)
                return PVecInt.Zero;

            var turretFacing = turreted != null  ? turreted.turretFacing : facing.Facing;
            return (PVecInt)(PVecFloat)Util.RotateVectorByFacing(barrel.TurretSpaceOffset.ToFloat2(), turretFacing, .7f);
        }
예제 #11
0
파일: Combat.cs 프로젝트: test71/OpenRA
        // gets the screen-space position of a barrel.
        public static float2 GetBarrelPosition(Actor self, IFacing facing, Turret turret, Barrel barrel)
        {
            var turreted = self.TraitOrDefault <Turreted>();

            if (turreted == null && facing == null)
            {
                return(float2.Zero);
            }

            var turretFacing = turreted != null  ? turreted.turretFacing : facing.Facing;

            return(GetTurretPosition(self, facing, turret) + barrel.ScreenSpaceOffset
                   + Util.RotateVectorByFacing(barrel.TurretSpaceOffset, turretFacing, .7f));
        }
예제 #12
0
 // gets the screen-space position of a barrel.
 public static PVecInt GetBarrelPosition(Actor self, IFacing facing, Turret turret, Barrel barrel)
 {
     return(GetTurretPosition(self, facing, turret) + barrel.ScreenSpaceOffset
            + GetUnitspaceBarrelOffset(self, facing, turret, barrel));
 }
예제 #13
0
        static PVecInt GetUnitspaceBarrelOffset(Actor self, IFacing facing, Turret turret, Barrel barrel)
        {
            var turreted = self.TraitOrDefault <Turreted>();

            if (turreted == null && facing == null)
            {
                return(PVecInt.Zero);
            }

            var turretFacing = turreted != null  ? turreted.turretFacing : facing.Facing;

            return((PVecInt)(PVecFloat)Util.RotateVectorByFacing(barrel.TurretSpaceOffset.ToFloat2(), turretFacing, .7f));
        }
예제 #14
0
파일: Combat.cs 프로젝트: geckosoft/OpenRA
        // gets the screen-space position of a barrel.
        public static float2 GetBarrelPosition(Actor self, IFacing facing, Turret turret, Barrel barrel)
        {
            var turreted = self.TraitOrDefault<Turreted>();

            if (turreted == null && facing == null)
                return float2.Zero;

            var turretFacing = turreted != null  ? turreted.turretFacing : facing.Facing;

            return Util.RotateVectorByFacing(barrel.Position, turretFacing, .7f);
        }
예제 #15
0
파일: Cloak.cs 프로젝트: RunCraze/OpenRA
 public void Attacking(Actor self, Target target, Armament a, Barrel barrel)
 {
     if (Info.UncloakOnAttack) Uncloak();
 }
예제 #16
0
 public void Attacking(Actor self, Target target, Armament a, Barrel barrel)
 {
     TakeAmmo();
 }
예제 #17
0
 public void Attacking(Actor self, Target target, Armament a, Barrel barrel)
 {
     Uncloak();
 }
예제 #18
0
		public void Attacking(Actor self, Target target, Armament a, Barrel barrel)
		{
			if (self.World.SharedRandom.Next(100 / Info.AttackPanicChance) == 0)
				Panic();
		}
예제 #19
0
 public void Attacking(Actor self, Target target, Armament a, Barrel barrel)
 {
     --charges;
     timeToRecharge = self.Info.Traits.Get<AttackTeslaInfo>().ReloadTime;
 }