public Bang AddBang(Vector2 p, BangType bangType, GameSound gameSound) { var b = AddBang(p, bangType); b.PlaySound(gameSound); return(b); }
/// <summary> /// Add bang /// </summary> /// <param name="p">Position to place the sprite</param> /// <param name="bangType">The type of bang to create</param> public Bang AddBang(Vector2 p, BangType bangType) { var b = new Bang(p, bangType); this._gameObjectCollection.Add(b); return(b); }
internal ExecuteBangParam(string args) { this.Options = new Dictionary <string, string>(); this.OverrideOptions = new List <Dictionary <string, string> >(); this.Commands = new List <string>(); this.Command = args.Trim(); this.DismissAction = null; this.Type = BangType.Unknown; }
public Bang(Vector2 position, BangType bangType) : base(position) { switch (bangType) { case BangType.Short: this._animationPlayer = new LinearAnimation(this, "Sprites/Props/ShortBang", 3); break; case BangType.Long: this._animationPlayer = new LinearAnimation(this, "Sprites/Props/LongBang", 12); break; default: throw new ArgumentOutOfRangeException(nameof(bangType)); } this._isExtant = true; this.Properties.Set(GameObjectProperties.DrawOrder, (int)SpriteDrawOrder.Bang); }
public Bang(World world, Vector2 position, BangType bangType) : base(world, position) { Animation a; switch (bangType) { case BangType.Short: a = Animation.SingleRunAnimation(World, "Sprites/Props/ShortBang", 3); break; case BangType.Long: a = Animation.SingleRunAnimation(World, "Sprites/Props/LongBang", 3); break; default: throw new ArgumentOutOfRangeException("bangType"); } Ap.PlayAnimation(a); Ap.AnimationFinished += AnimationFinished; this._isExtant = true; }
internal ExecuteBangParam(string args) { this.Options = new Dictionary<string, string>(); this.OverrideOptions = new List<Dictionary<string, string>>(); this.Commands = new List<string>(); this.Command = args.Trim(); this.DismissAction = null; this.Type = BangType.Unknown; }
/// <summary> /// Add bang /// </summary> /// <param name="p">Position to place the sprite</param> /// <param name="bangType">The type of bang to create</param> public void AddBang(Vector2 p, BangType bangType) { var b = new Bang(this, p, bangType); this.GameObjects.Add(b); }