コード例 #1
0
        public void OnApplianceTaken(IGameController gc, InventoryMedicalItemBase appliance, BodyParts bodyPart)
        {
            if (IsTreated)
            {
                return;
            }

            if (TreatedStage != null)
            {
                if (TreatedStage.OnApplianceTaken != null)
                {
                    TreatedStage.OnApplianceTaken(gc, new ApplianceInfo {
                        Appliance = appliance, BodyPart = bodyPart
                    }, this);
                }
            }
            else
            {
                var stage = GetActiveStage(gc.WorldTime.Value);

                if (stage != null && stage.OnApplianceTaken != null)
                {
                    stage.OnApplianceTaken(gc, new ApplianceInfo {
                        Appliance = appliance, BodyPart = bodyPart
                    }, this);
                }
            }
        }
コード例 #2
0
        public void OnConsumeItem(IGameController gc, InventoryConsumableItemBase consumable)
        {
            if (IsTreated)
            {
                return;
            }

            if (TreatedStage != null)
            {
                TreatedStage.OnConsumeItem(gc, consumable, this);
            }
            else
            {
                var stage = GetActiveStage(gc.WorldTime.Value);

                if (stage != null)
                {
                    stage.OnConsumeItem(gc, consumable, this);
                }
            }
        }