예제 #1
0
 public InnerShineRecord(InnerShineItem ISI)
 {
     label     = ISI.label;
     spawned   = new List <Thing>();
     ticksLeft = ISI.NewPeriod();
     lastColor = Color.black;
 }
예제 #2
0
        public static void TryPlaceMote(this InnerShineItem ISI, InnerShineRecord ISR, Pawn pawn)
        {
            //if (!HasShinePool)return;
            //Thing result = null;

            // wont exit because we want to record lastFootPos + use old value before recording it
            if (pawn.Position.InBounds(pawn.Map))
            {
                float rot = 0;
                ISI.InitSpecs(ISR, pawn, out Vector3 drawPosWithOffset, out float scale);

                if (drawPosWithOffset.ToIntVec3().InBounds(pawn.Map))
                {
                    ThingDef moteDef = ISI.motePool.RandomElementWithFallback();

                    if (drawPosWithOffset.TryAnyMoteSpawn(pawn.Map, rot, scale, moteDef, ISI.debug) is Mote mote)
                    {
                        ISI.ChangeMoteColor(ISR, mote);
                        ISR.spawned.Add(mote);
                        ISI.NewPeriod();
                    }
                }
            }
        }
예제 #3
0
 public static void ResetTicks(this InnerShineItem ISI, InnerShineRecord ISR) => ISR.ticksLeft = ISI.NewPeriod();