コード例 #1
0
ファイル: CompOverlay.cs プロジェクト: kbatbouta/WhatTheHack
        private void DrawBackground(Building_RogueAI parent)
        {
            CompProperties_Overlays.GraphicOverlay background = Props.background;
            GraphicData gdRogueAI = background.graphicDataDefault;

            gdRogueAI.Graphic.Draw(parent.DrawPos + new Vector3(0, -1, 0), parent.Rotation, parent, 0f);
        }
コード例 #2
0
        public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false)
        {
            Building_RogueAI rogueAI = t as Building_RogueAI;

            if (rogueAI != null)
            {
                return(new Job(WTH_DefOf.WTH_HackRogueAI, rogueAI));
            }
            return(null);
        }
コード例 #3
0
ファイル: CompOverlay.cs プロジェクト: kbatbouta/WhatTheHack
        private void DrawEye(Building_RogueAI parent)
        {
            CompProperties_Overlays.GraphicOverlay overlay = Props.GetEyeOverlay(parent.goingRogue ? Building_RogueAI.Mood.Mad : parent.CurMoodCategory);
            GraphicData gdEye      = overlay.graphicDataDefault;
            Vector3     drawPosEye = parent.DrawPos;

            drawPosEye.y += 0.046875f;
            drawPosEye   += overlay.offsetDefault;
            SetAnimationOffset(ref drawPosEye);
            gdEye.Graphic.Draw(drawPosEye, parent.Rotation, parent, 0f);
        }
コード例 #4
0
ファイル: CompOverlay.cs プロジェクト: kbatbouta/WhatTheHack
        public override void PostDraw()
        {
            base.PostDraw();
            Building_RogueAI parent = this.parent as Building_RogueAI;

            DrawBackground(parent);
            if (ShowEye)
            {
                DrawEye(parent);
            }
        }
コード例 #5
0
        public override bool HasJobOnThing(Pawn pawn, Thing t, bool forced = false)
        {
            Building_RogueAI rogueAI = t as Building_RogueAI;

            if (rogueAI != null && rogueAI.goingRogue)
            {
                LocalTargetInfo target = rogueAI;
                if (pawn.CanReserveAndReach(target, PathEndMode.ClosestTouch, Danger.Deadly, 10, 1, null, forced))
                {
                    return(true);
                }
            }
            return(false);
        }