Exemplo n.º 1
0
 public virtual void NotifyMasterLifeForm(NotificationType aNotifyType, LifeForm aLifeForm)
 {
     if (_Master != null)
     {
         _Master.NotifyMasterLifeForm(aNotifyType, aLifeForm);
     }
     else
     {
         ManageMasterNotification(aNotifyType, aLifeForm);
     }
 }
Exemplo n.º 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;
            }
        }
Exemplo n.º 3
0
 public EnvironmentLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna)
     : base(aMaster, aLifeFormType, aDna)
 {
     BeginMainTask();
 }
Exemplo n.º 4
0
 public EnvironmentLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType)
     : base(aMaster, aLifeFormType)
 {
     BeginMainTask();
 }
Exemplo n.º 5
0
 public EnvironmentLifeForm(LifeForm aMaster)
     : base(aMaster, LifeFormTypes.EnvironmentEntity)
 {
     BeginMainTask();
 }
Exemplo n.º 6
0
 public override void NotifyMasterLifeForm(NotificationType aNotifyType, LifeForm aLifeForm)
 {
     ManageMasterNotification(aNotifyType, aLifeForm);
     base.NotifyMasterLifeForm(aNotifyType, aLifeForm);
 }
Exemplo n.º 7
0
 public LifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna)
 {
     _Master = aMaster;
     LfType  = aLifeFormType;
     ReGenerateADN(aLifeFormType, aDna);
 }
Exemplo n.º 8
0
 public LifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType)
 {
     _Master = aMaster;
     LfType  = aLifeFormType;
     ReGenerateADN(aLifeFormType, null);
 }
Exemplo n.º 9
0
 public virtual void ManageMasterNotification(NotificationType aNotifyType, LifeForm aLifeForm)
 {
 }
Exemplo n.º 10
0
 public FoodLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna)
     : base(aMaster, aLifeFormType, aDna)
 {
     FoodValue = GetAttribute(SkillTypes.FoodProductionRate);
     BeginMainTask();
 }
Exemplo n.º 11
0
 public FoodLifeForm(LifeForm aMaster)
     : base(aMaster, LifeFormTypes.FoodTypeLifeForm)
 {
     FoodValue = GetAttribute(SkillTypes.FoodProductionRate);
     BeginMainTask();
 }