Mostly implemented Sonar Pulse

This commit is contained in:
Paul Chote
2010-01-25 00:28:43 +13:00
parent 8ffb000e2e
commit e6ded0e491
8 changed files with 158 additions and 98 deletions

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRa.Orders;
namespace OpenRa.Traits
{
public class SonarPulsePowerInfo : SupportPowerInfo
{
public override object Create(Actor self) { return new SonarPulsePower(self, this); }
}
public class SonarPulsePower : SupportPower
{
public SonarPulsePower(Actor self, SonarPulsePowerInfo info) : base(self, info) { }
protected override void OnBeginCharging() { }
protected override void OnFinishCharging() { Sound.Play("pulse1.aud"); }
protected override void OnActivate()
{
// Question: Is this method synced? or does it have to go via an order?
// TODO: Reveal submarines
// Should this play for all players?
Sound.Play("sonpulse.aud");
FinishActivate();
}
}
}