예제 #1
0
		public static void PlayVoiceForOrders(this World w, Order[] orders)
		{
			// Find an actor with a phrase to say
			foreach (var o in orders)
			{
				if (o == null)
					continue;

				var orderSubject = o.Subject;
				if (orderSubject.Disposed)
					continue;

				foreach (var voice in orderSubject.TraitsImplementing<IVoiced>())
					foreach (var v in orderSubject.TraitsImplementing<IOrderVoice>())
					{
						if (voice.PlayVoice(orderSubject, v.VoicePhraseForOrder(orderSubject, o),
							orderSubject.Owner.Faction.InternalName))
							return;
					}
			}
		}
예제 #2
0
파일: Order.cs 프로젝트: ushardul/OpenRA
        public Order(string orderstring, Order order)
            : this(orderstring, order.Subject, order.TargetActor, order.TargetLocation,
				   order.TargetString, order.Queued, order.ExtraLocation, order.ExtraData)
        {
        }
예제 #3
0
		public Order(string orderstring, Order order)
			: this(orderstring, order.Subject, order.TargetActor, order.TargetLocation,
				   order.TargetString, order.Queued, order.ExtraLocation, order.ExtraData) {}
예제 #4
0
 public void IssueOrder(Order o)
 {
     OrderManager.IssueOrder(o);
 }                                                                       /* avoid exposing the OM to mod code */
예제 #5
0
파일: WorldUtils.cs 프로젝트: FMode/OpenRA
 public static void PlayVoiceForOrders(this World w, Order[] orders)
 {
     // Find an actor with a phrase to say
     foreach (var o in orders)
     {
         if (o.Subject.Destroyed) continue;
         foreach (var v in o.Subject.TraitsImplementing<IOrderVoice>())
             if (Sound.PlayVoice(v.VoicePhraseForOrder(o.Subject, o),
                 o.Subject, o.Subject.Owner.Country.Race))
                 return;
     }
 }
예제 #6
0
 // Hide the OrderManager from mod code
 public void IssueOrder(Order o)
 {
     OrderManager.IssueOrder(o);
 }