Пример #1
0
 public virtual void NotifyMasterLifeForm(NotificationType aNotifyType, LifeForm aLifeForm)
 {
     if (_Master != null)
     {
         _Master.NotifyMasterLifeForm(aNotifyType, aLifeForm);
     }
     else
     {
         ManageMasterNotification(aNotifyType, aLifeForm);
     }
 }
Пример #2
0
        public override void ManageMasterNotification(NotificationType aNotifyType, LifeForm aLifeForm)
        {
            switch (aNotifyType)
            {
            case Life.NotificationType.Born:
                if (!ManagedOnes.ContainsValue(aLifeForm))
                {
                    ManagedOnes.Add(aLifeForm.dna.Id, aLifeForm);
                }
                break;

            case Life.NotificationType.Dead:
                if (ManagedOnes.ContainsValue(aLifeForm))
                {
                    ManagedOnes.Remove(aLifeForm.dna.Id);
                }
                break;
            }
        }
Пример #3
0
 public EnvironmentLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna)
     : base(aMaster, aLifeFormType, aDna)
 {
     BeginMainTask();
 }
Пример #4
0
 public EnvironmentLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType)
     : base(aMaster, aLifeFormType)
 {
     BeginMainTask();
 }
Пример #5
0
 public EnvironmentLifeForm(LifeForm aMaster)
     : base(aMaster, LifeFormTypes.EnvironmentEntity)
 {
     BeginMainTask();
 }
Пример #6
0
 public override void NotifyMasterLifeForm(NotificationType aNotifyType, LifeForm aLifeForm)
 {
     ManageMasterNotification(aNotifyType, aLifeForm);
     base.NotifyMasterLifeForm(aNotifyType, aLifeForm);
 }
Пример #7
0
 public LifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna)
 {
     _Master = aMaster;
     LfType  = aLifeFormType;
     ReGenerateADN(aLifeFormType, aDna);
 }
Пример #8
0
 public LifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType)
 {
     _Master = aMaster;
     LfType  = aLifeFormType;
     ReGenerateADN(aLifeFormType, null);
 }
Пример #9
0
 public virtual void ManageMasterNotification(NotificationType aNotifyType, LifeForm aLifeForm)
 {
 }
Пример #10
0
 public FoodLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna)
     : base(aMaster, aLifeFormType, aDna)
 {
     FoodValue = GetAttribute(SkillTypes.FoodProductionRate);
     BeginMainTask();
 }
Пример #11
0
 public FoodLifeForm(LifeForm aMaster)
     : base(aMaster, LifeFormTypes.FoodTypeLifeForm)
 {
     FoodValue = GetAttribute(SkillTypes.FoodProductionRate);
     BeginMainTask();
 }