Beispiel #1
0
        private void StarportReached(object cookie)
        {
            KeyValuePair <Entity, ContractEventData> keyValuePair = (KeyValuePair <Entity, ContractEventData>)cookie;
            SmartEntity       starport = (SmartEntity)keyValuePair.Key;
            ContractEventData value    = keyValuePair.Value;

            this.RemoveTransportRequest(value);
            TroopTypeVO troop = this.sdc.Get <TroopTypeVO>(value.Contract.ProductUid);

            StorageSpreadUtils.AddTroopToStarportVisually(starport, troop);
            Service.EventManager.SendEvent(EventId.TransportDeparted, null);
        }
        private void StarportReached(object cookie)
        {
            KeyValuePair <Entity, ContractEventData> keyValuePair = (KeyValuePair <Entity, ContractEventData>)cookie;
            Entity            key   = keyValuePair.get_Key();
            ContractEventData value = keyValuePair.get_Value();

            this.RemoveTransportRequest(value);
            TroopTypeVO troop = this.sdc.Get <TroopTypeVO>(value.Contract.ProductUid);

            StorageSpreadUtils.AddTroopToStarportVisually(key, troop);
            Service.Get <EventManager>().SendEvent(EventId.TransportDeparted, null);
        }
 public void OnTroopReachedPathEnd()
 {
     this.pathReached = true;
     StorageSpreadUtils.AddTroopToStarportVisually(this.starportEntity, this.troopVO);
     this.TryShowEffect();
 }