Exemplo n.º 1
0
        public void Initialize(ProjectileDefinition definition, GameObj source, GameObj target)
        {
            Reset();

            Source     = source;
            Target     = target;
            Definition = definition;

            LifeSpan    = definition.Lifespan;
            ChaseTarget = definition.ChaseTarget;
            UpdateHeading();
            TurnSpeed           = definition.TurnSpeed;
            CollidesWithTerrain = definition.CollidesWithTerrain;
            //SpellDefinition = spellDefinition;
            DestroysWithTerrain     = definition.DestroysWithTerrain;
            DestroysWithEnemy       = definition.DestroysWithEnemy;
            FollowArc               = definition.FollowArc;
            Orientation             = MathHelper.ToRadians(definition.StartingRotation);
            ShowIcon                = definition.ShowIcon;
            IsCollidable            = definition.IsCollidable;
            CollidesWith1Ways       = definition.CollidesWith1Ways;
            DestroyOnRoomTransition = definition.DestroyOnRoomTransition;
            CanBeFusRohDahed        = definition.CanBeFusRohDahed;
            IgnoreInvincibleCounter = definition.IgnoreInvincibleCounter;
            WrapProjectile          = definition.WrapProjectile;
            Damage     = definition.Damage;
            IsWeighted = definition.IsWeighted;
            ChangeSprite(definition.SpriteName);
            RotationSpeed    = definition.RotationSpeed;
            Scale            = definition.Scale;
            AltX             = definition.AltX;
            AltY             = definition.AltY;
            InitAngleRange   = definition.Angle;
            InitSpeedRange   = definition.Speed;
            InitAngleOffset  = definition.AngleOffset;
            InitSourceAnchor = definition.SourceAnchor;
            InitLockPosition = definition.LockPosition;
            Visible          = true;
        }
Exemplo n.º 2
0
 public ProjectileFireEvent(GameObj sender, Projectiles.ProjectileDefinition definition, Projectiles.ProjectileObj projectile)
     : base(sender)
 {
     _projDef    = definition;
     _projectile = projectile;
 }
Exemplo n.º 3
0
        public void Initialize(ProjectileDefinition definition, GameObj source, GameObj target)
        {
            Reset();

            Source = source;
            Target = target;
            Definition = definition;

            LifeSpan = definition.Lifespan;
            ChaseTarget = definition.ChaseTarget;
            UpdateHeading();
            TurnSpeed = definition.TurnSpeed;
            CollidesWithTerrain = definition.CollidesWithTerrain;
            //SpellDefinition = spellDefinition;
            DestroysWithTerrain = definition.DestroysWithTerrain;
            DestroysWithEnemy = definition.DestroysWithEnemy;
            FollowArc = definition.FollowArc;
            Orientation = MathHelper.ToRadians(definition.StartingRotation);
            ShowIcon = definition.ShowIcon;
            IsCollidable = definition.IsCollidable;
            CollidesWith1Ways = definition.CollidesWith1Ways;
            DestroyOnRoomTransition = definition.DestroyOnRoomTransition;
            CanBeFusRohDahed = definition.CanBeFusRohDahed;
            IgnoreInvincibleCounter = definition.IgnoreInvincibleCounter;
            WrapProjectile = definition.WrapProjectile;
            Damage = definition.Damage;
            IsWeighted = definition.IsWeighted;
            ChangeSprite(definition.SpriteName);
            RotationSpeed = definition.RotationSpeed;
            Scale = definition.Scale;
            AltX = definition.AltX;
            AltY = definition.AltY;
            InitAngleRange = definition.Angle;
            InitSpeedRange = definition.Speed;
            InitAngleOffset = definition.AngleOffset;
            InitSourceAnchor = definition.SourceAnchor;
            InitLockPosition = definition.LockPosition;
            Visible = true;
        }