protected override void OnAttached(SimObject simObject) { simObject.RegisterPropertyUpdateAction <NectarProperty>(NectarUpdated); simObject.RegisterPropertyUpdateAction <EnergyProperty>(EnergyUpdated); simObject.Color = Colors.Black; GiveRandomDirection(simObject, Speed); simObject.Properties.Add(new EnergyProperty(30, 30)); }
protected override void OnAttached(SimObject simObject) { Bees = new List <SimObject>(); SpawnLocation = simObject.Location.Add(new Vector2(simObject.Size.Width / 2, simObject.Size.Height + 5)); simObject.RegisterPropertyUpdateAction <NectarProperty>(NectarUpdated); }
protected override void OnAttached(SimObject simObject) { GiveRandomDirection(simObject, Speed); simObject.Color = Colors.Red; simObject.RegisterPropertyUpdateAction <EnergyProperty>(EnergyUpdated); }