public void MergeWith(Collector other) { poofAnim.Play(0); Audio.Play("collector.merge", display); OrderedDictionary o = new OrderedDictionary(); o.Add("team_1", id); o.Add("team_2", other.id); EventManager.Emit("collector:merge", o); capacity += (int)(other.capacity * 0.5); collected += (int)(other.collected * 0.5); collectRadius += (int)(other.collectRadius * 0.5f); targetScale += (other.scale * 0.3f); numCollectors += other.numCollectors; foreach (User u in other.users) { u.collector = this; users.Add(u); } health = 100; TeamColour.Put(other.teamColour); CollectorManager.Remove(other); }
public void PortalDie() { if (!isDying) { Die(); portalAnim.WhenFinished(() => { TeamColour.Put(teamColour); CollectorManager.Remove(this); }); collectorAnim.Play((int)States.Outro1 + damage); portalAnim.Play(0); } }
public void ExplodeDie() { if (!isDying) { Die(); explodeAnim.WhenFinished(() => { TeamColour.Put(teamColour); CollectorManager.Remove(this); }); Audio.Play("collector.bass", 4); collectorAnim.Play((int)States.Exploding); collectorAnim.frameOffset = new Vector2(50, 137); explodeAnim.Play(0); } }