internal ItemIcon(string name, Actor actor) : base(name, actor) { Visible = false; ZOrder = int.MaxValue; This.Game.LoadingLevel.RemoveSprite(this); }
internal Item(string name, Actor actor, Actor iconActor = null) : base(name, actor) { if (iconActor != null) { Icon = new ItemIcon(name + "_Icon", iconActor); } }
internal Player(string name, Actor actor) : base(name, actor) { (This.Game.LoadingLevel as FrostbyteLevel).allies.Add(this); Mana = MaxMana; MaxHealth = 100; Health = MaxHealth; }
internal Boss(string name, Actor actor, float speed, int health) : base(name, actor, speed, health) { Enabled = true; HealthChanged += delegate(object boss, int value) { if (!AtArms && value != MaxHealth) { setAtArms(); } }; This.Game.LoadingLevel.RemoveSprite(healthBar); healthBar = null; }
internal Sprite(string name, Actor actor) { mName = name; mActor = actor; mLastUpdate = new GameTime(); LoadBehavior = () => { }; UpdateBehavior = () => { }; EndBehavior = () => { }; (This.Game.CurrentLevel != This.Game.NextLevel && This.Game.NextLevel != null ? This.Game.NextLevel : This.Game.CurrentLevel).AddSprite(this); Speed = 3; if (mActor != null) { if (mActor.Animations[mActor.CurrentAnimation].Built) { if (mActor.Animations[mActor.CurrentAnimation].NumFrames > 1) mAnimating = true; } } }
internal Sprite(string name, Actor actor) { mName = name; mActor = actor; mLastUpdate = new GameTime(); LoadBehavior = () => { }; UpdateBehavior = () => { }; EndBehavior = () => { }; //adds the sprite to the level This.Game.LoadingLevel.AddSprite(this); Speed = 1; if (mActor != null) { if (mActor.Animations[mActor.CurrentAnimation].Built) { if (mActor.Animations[mActor.CurrentAnimation].NumFrames > 1) mAnimating = true; } } Center = new Vector2(GetAnimation().Width / 2, GetAnimation().Height / 2); }
internal OurSprite(string name, Actor actor) : base(name, actor) { }
internal OurSprite(string name, Actor actor, int collisionlist) : base(name, actor, collisionlist) { }
internal Obstacle(string name, Actor actor) : base(name, actor) { (This.Game.CurrentLevel as FrostbyteLevel).obstacles.Add(this); }
internal Player(string name, Actor actor) : base(name, actor) { (This.Game.CurrentLevel as FrostbyteLevel).allies.Add(this); }
/// <summary> /// Creates a polygon with an arbitrary number of points /// </summary> /// <param name="name">Name of the sprite</param> /// <param name="actor">The actor that the sprite will use</param> /// <param name="color">Sprite's display color</param> /// <param name="points">Vector of points</param> internal Polygon(string name, Actor actor, Color color, params Vector3[] points) : this(name, actor, points.Select(p => new VertexPositionColor(p, color)).ToArray()) { }
internal Enemy(string name, Actor actor) : base(name, actor) { (This.Game.CurrentLevel as FrostbyteLevel).enemies.Add(this); }
/// <summary> /// Creates a polygon with an arbitrary number of points /// </summary> /// <param name="name">Name of the sprite</param> /// <param name="actor">The actor that the sprite will use</param> /// <param name="points">Variable number of VertexPositionColor points</param> internal Polygon(string name, Actor actor, params VertexPositionColor[] points) : base(name, actor) { Points = points; basicEffect.VertexColorEnabled = true; }
internal Sprite(string name, Actor actor, int collisionlist) : this(name, actor) { CollisionList = collisionlist; }
public Enemy(string name, Actor actor, float speed, int _health) : base(name, actor) { FrostbyteLevel l = This.Game.LoadingLevel as FrostbyteLevel; Personality = new WanderingMinstrelPersonality(this); UpdateBehavior = update; l.enemies.Add(this); EndBehavior = Die; Speed = speed; Health = _health; CollidesWithBackground = true; #region HealthBar float alpha = 0.15f; healthBar = new ProgressBar("Health_" + Name, MaxHealth, Color.Black * 0, Color.Red * 0.5f, Color.Black * alpha, barSize); healthBar.Pos = Pos - l.Camera.Pos + new Vector2(0, -20); healthBar.Static = true; healthBar.Value = MaxHealth; HealthChanged += delegate(object obj, int value) { if (healthBar != null) { healthBar.Value = value; if (value == 0) { This.Game.CurrentLevel.RemoveSprite(healthBar); } } }; #endregion }
internal void AddActor(string name, Actor actor) { mActors[name] = actor; }
internal BossDeath(string name, Actor actor) : base(name, actor) { UpdateBehavior = update; mStates = states().GetEnumerator(); }