Exemple #1
0
        public override void PreAbsorbStack(Thing otherStack, int count)
        {
            float         t    = (float)count / (float)(this.parent.stackCount + count);
            CompIncubator comp = ((ThingWithComps)otherStack).GetComp <CompIncubator>();
            float         b    = comp.gestateProgress;

            this.gestateProgress = Mathf.Lerp(this.gestateProgress, b, t);
        }
Exemple #2
0
        public override void PostSplitOff(Thing piece)
        {
            CompIncubator comp = ((ThingWithComps)piece).GetComp <CompIncubator>();

            comp.gestateProgress = this.gestateProgress;
            comp.hatcheeParent   = this.hatcheeParent;
            comp.otherParent     = this.otherParent;
            comp.hatcheeFaction  = this.hatcheeFaction;
        }