public DamageOnImpactComponent(Item parent, float damage, Environment environment, float minFlinch, float maxFlinch)
     : base(parent, "DamageOnImpactComponent")
 {
     this.damage = damage;
     this.environment = environment;
     this.minFlinch = minFlinch;
     this.maxFlinch = maxFlinch;
 }
 /// <summary>
 /// Removes an item from the world. Also takes care of physics removal.
 /// </summary>
 /// <param name="item">The item to remove</param>
 public void Remove(Item item)
 {
     Items.Remove(item);
     entityManager.RemoveEntity(item);
     physics.RemovePhysicsEntity(item.GetBox());
 }
 /// <summary>
 /// Adds an item to the item manager. Takes care of setting the item up for the physics engine and game environment
 /// </summary>
 /// <param name="item"></param>
 public void Add(Item item)
 {
     Items.Add(item);
     entityManager.AddEntity(item);
     physics.AddPhysicsEntity(item.GetBox());
 }
 public SelfDestructOnImpactComponent(Item parent, Environment environment, bool destructOnArenaImpact)
     : base(parent, "DestroyItemOnCharacterImpactComponent")
 {
     this.environment = environment;
     this.destructOnArenaImpact = destructOnArenaImpact;
 }
Пример #5
0
 public void Remove(Item item)
 {
     itemManager.Remove(item);
 }
Пример #6
0
 public void AddItem(Item item)
 {
     itemManager.Add(item);
 }
 public SelfDestructAfterTimeComponent(Item parent, Environment environment, int msTillSelfDestruct)
     : base(parent, "SelfDestructAfterTimeComponent")
 {
     this.environment = environment;
     this.msTillSelfDestruct = msTillSelfDestruct;
 }