public virtual void NotifyMasterLifeForm(NotificationType aNotifyType, LifeForm aLifeForm) { if (_Master != null) { _Master.NotifyMasterLifeForm(aNotifyType, aLifeForm); } else { ManageMasterNotification(aNotifyType, aLifeForm); } }
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; } }
public EnvironmentLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna) : base(aMaster, aLifeFormType, aDna) { BeginMainTask(); }
public EnvironmentLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType) : base(aMaster, aLifeFormType) { BeginMainTask(); }
public EnvironmentLifeForm(LifeForm aMaster) : base(aMaster, LifeFormTypes.EnvironmentEntity) { BeginMainTask(); }
public override void NotifyMasterLifeForm(NotificationType aNotifyType, LifeForm aLifeForm) { ManageMasterNotification(aNotifyType, aLifeForm); base.NotifyMasterLifeForm(aNotifyType, aLifeForm); }
public LifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna) { _Master = aMaster; LfType = aLifeFormType; ReGenerateADN(aLifeFormType, aDna); }
public LifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType) { _Master = aMaster; LfType = aLifeFormType; ReGenerateADN(aLifeFormType, null); }
public virtual void ManageMasterNotification(NotificationType aNotifyType, LifeForm aLifeForm) { }
public FoodLifeForm(LifeForm aMaster, LifeFormTypes aLifeFormType, DNASequence aDna) : base(aMaster, aLifeFormType, aDna) { FoodValue = GetAttribute(SkillTypes.FoodProductionRate); BeginMainTask(); }
public FoodLifeForm(LifeForm aMaster) : base(aMaster, LifeFormTypes.FoodTypeLifeForm) { FoodValue = GetAttribute(SkillTypes.FoodProductionRate); BeginMainTask(); }