示例#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
        // 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;
 }