コード例 #1
0
 public static void Apply(CapacityInfoModifier modifier, ref CapacityInfo capacityInfo)
 {
     if (modifier.Multiplicative)
     {
         capacityInfo *= modifier.CapacityInfo;
     }
     else
     {
         capacityInfo += modifier.CapacityInfo;
     }
 }
コード例 #2
0
        public override void Awake()
        {
            base.Awake();

            CapacitiesModifiers = new List <CapacityInfoModifier>();
            CapacitiesDirty     = false;

            CapacityInfoBase = new CapacityInfo(1f);
            CapacityInfoBase.SetCapacity(ECapacityType.Pain, 0f);
            capacityInfoCurrent = this.CapacityInfoBase.Clone();

            _eventGenerator = new CapacitiesEventGenerator(this);
        }