protected override void TouchCollider(Collider C) { // Attempt to light your torch FireLightComponent F = C.getComponent <FireLightComponent>(); if ((ItemPickupSystem.Item == Items.Torch || ItemPickupSystem.Item != Items.TorchLit) && F != null) { ItemPickupSystem.Modifier = F.FireLimit; ItemPickupSystem.UpdateText(); } // Attempt to open a door DoorComponent D = C.getComponent <DoorComponent>(); if (D != null) { D.TryOpen(); } // Attempt to purchase MerchantComponent M = C.getComponent <MerchantComponent>(); if (M != null) { M.TryBuy(); } }
public override void update() { if (IntroTimer.GetFinished()) { TimeSystem.update(); if (IntroCard != null) { IntroCard.destroy(); IntroCard = null; } } base.update(); ItemPickupSystem.Update(); HUDPositionSystem.Update(); BurningSystem.Update(); MoneySystem.Update(); }
protected override void Dead() { if (DeathTimer.GetFinished()) { if (ItemPickupSystem.EmptyItem != null) { ItemPickupSystem.EmptyItem.Item = ItemPickupSystem.Item; ItemPickupSystem.EmptyItem.entity.position = entity.position; ItemPickupSystem.EmptyItem.entity.addComponent(Animations.GetItemSprite(ItemPickupSystem.Item)); } ItemPickupSystem.Item = Items.None; entity.destroy(); CameraFollowComponent CFC = Core.scene.camera.getComponent <CameraFollowComponent>(); CFC.Follow = EntityFactory.Player(OriginalPos); ItemPickupSystem.FullUpdate(); } }
public override void onRemovedFromEntity() { ItemPickupSystem.Remove(this); }
public override void onAddedToEntity() { ItemPickupSystem.Add(this); }
protected override void DidMove() { ItemPickupSystem.ModifierChange(); FireSystem.Age(); }