public Dialog(List<Conversation> conversations, Entity owner, int cooldown = 2000) : base() { _enter = new EventHandler(OnEnter); _conversations = new List<Conversation>(); foreach(Conversation con in conversations) { _conversations.Add(con.Clone()); } _dm = DialogManager.Instance; _cm = owner.CM; _cm.AddCounter(_cShutdown); _cm.Bang += new EventHandler<BangEventArgs>(OnBang); _currentCon = _conversations.First().GetIterator(); this._owner = owner; Cooldown = cooldown; foreach (Conversation con in _conversations) { try { con.Add(new ComboBreaker()); } catch (ConversationAlreadyFinalisedException e) { } con.SetOwner(owner); } }
public void SetOwner(Entity owner) { _owner = owner; _cm = owner.CM; _cm.AddCounter(_cShooter, CooldownTime, true); _cm.Bang += new EventHandler<BangEventArgs>(OnBang); }
public override void SetOwner(Entity owner) { base.SetOwner(owner); _cm = owner.CM; _cm.AddCounter(_cInvulnerable, _invulnerableDuration); _cm.Bang += new EventHandler<BangEventArgs>(OnBang); }
public override void SetOwner(Entity owner) { base.SetOwner(owner); _jump.SetOwner(owner); _swing.SetOwner(owner); _interact.SetOwner(owner); _cm = owner.CM; _cm.Bang += new EventHandler<BangEventArgs>(OnBang); }
public Entity(Game1 game, Vector2 position, String name = "Entity") : base(game) { this.Position = position; this.Health = 5; this.Name = name; this.Invulnerable = false; Face = Facing.DOWN; CM = new CounterManager(); CM.AddCounter(_cInvulnerable, _invulnerableDuration); CM.Bang += new EventHandler<BangEventArgs>(OnBang); }
public EntityGruselUte(Game game, Vector2 position, Texture2D texture) : base(game, position, texture) { _health = Constants.GruselUte_Health; _canBeAttacked = true; _radius = Constants.GruselUte_Radius; _animTexture = texture; _weaponRange = Constants.GruselUte_HitRange; _animTexture = texture; _animSource = new Vector2(0, 0); _animated = true; _cm = new CounterManager(); _cm.Bang += new EventHandler<BangEventArgs>(OnBang); _cm.AddCounter(_hitCounter, Constants.Player_HitDuration); }
public Player(Game game) : base(game, Vector2.Zero, null) { _weaponRange = Constants.Player_WeaponRange; _cm = new CounterManager(); _cm.Bang += new EventHandler<BangEventArgs>(OnBang); (Game as Game1)._input.Potion.Pressed += new EventHandler(UsePotion); _cm.AddCounter(_hitCounter, Constants.Player_HitDuration); _radius = Constants.Player_Radius; //FrameCounter _cm.AddCounter(_animCounter, 250); _cm.StartCounter(_animCounter,false); _health = 500; _canBeAttacked = true; }
public void SetOwner(Entity owner) { _owner = owner; _cm = owner.CM; _cm.AddCounter(_cSwingHit, Duration, true); _cm.Bang += new EventHandler<BangEventArgs>(OnBang); }
public override void SetOwner(Entity owner) { _cm = owner.CM; _cm.AddCounter(_cShutdown); _cm.Bang += new EventHandler<BangEventArgs>(OnBang); _currentCon = _conversations.First().GetIterator(); this._owner = owner; foreach (Conversation con in _conversations) { try { con.Add(new ComboBreaker()); } catch (ConversationAlreadyFinalisedException e) { } con.SetOwner(owner); } }
public void Initialize(CounterManager _proprietor) { _proprietor.Start += new EventHandler<CounterEventArgs>(OnStartCounter); _proprietor.Cancel += new EventHandler<CounterEventArgs>(OnCancel); }
public void SetOwner(Entity owner) { _owner = owner; _cm = owner.CM; _cm.Bang += new EventHandler<BangEventArgs>(OnBang); _cm.AddCounter(_cJump); _owner = owner; }