コード例 #1
0
        // Token: 0x060000E3 RID: 227 RVA: 0x000058A8 File Offset: 0x00003AA8
        public Toil GoToStageLocation(Building_Performance stage, RazzleDazzle_Director.StageLocations loc)
        {
            Toil toil = Toils_Goto.GotoCell(GetStageCell(loc, stage), PathEndMode.OnCell);

            toil.tickAction = delegate()
            {
                stage.ticksIntoThisPerformance++;
            };
            return(toil);
        }
コード例 #2
0
        // Token: 0x060000E8 RID: 232 RVA: 0x00005ED4 File Offset: 0x000040D4
        public static IntVec3 GetStageCell(RazzleDazzle_Director.StageLocations loc, Building_Performance stage)
        {
            IntVec3 position = stage.Position;
            Rot4    rotation = stage.Rotation;
            var     result   = new IntVec3(position.x, position.y, position.z);

            switch (loc)
            {
            case StageLocations.STAGE_R:
                if (rotation.IsHorizontal)
                {
                    result.z -= 2;
                }
                else
                {
                    result.x -= 2;
                }
                break;

            case StageLocations.STAGE_L:
                if (rotation.IsHorizontal)
                {
                    result.z += 2;
                }
                else
                {
                    result.x += 2;
                }
                break;

            case StageLocations.UPSTAGE_R:
                if (rotation.IsHorizontal)
                {
                    result.z -= 2;
                    result.x--;
                }
                else
                {
                    result.x -= 2;
                    result.z++;
                }
                break;

            case StageLocations.UPSTAGE_L:
                if (rotation.IsHorizontal)
                {
                    result.z += 2;
                    result.x--;
                }
                else
                {
                    result.x += 2;
                    result.z++;
                }
                break;

            case StageLocations.UPSTAGE_C:
                if (rotation.IsHorizontal)
                {
                    result.x--;
                }
                else
                {
                    result.z++;
                }
                break;

            case StageLocations.DOWNSTAGE_R:
                if (rotation.IsHorizontal)
                {
                    result.z -= 2;
                    result.x++;
                }
                else
                {
                    result.x -= 2;
                    result.z--;
                }
                break;

            case StageLocations.DOWNSTAGE_L:
                if (rotation.IsHorizontal)
                {
                    result.z += 2;
                    result.x++;
                }
                else
                {
                    result.x += 2;
                    result.z--;
                }
                break;

            case StageLocations.DOWNSTAGE_C:
                if (rotation.IsHorizontal)
                {
                    result.x++;
                }
                else
                {
                    result.z--;
                }
                break;

            case StageLocations.BACKSTAGE:
                if (rotation.IsHorizontal)
                {
                    result.x += 3;
                }
                else
                {
                    result.z -= 3;
                }
                break;
            }
            return(result);
        }