Beispiel #1
0
        public void Reset()
        {
            this.Seed                = (int)DateTime.UtcNow.TimeOfDay.Ticks;
            m_CurrentMap             = null;
            m_Scoring                = new Scoring();
            m_World                  = null;
            m_WorldTime              = new WorldTime();
            this.LastTurnPlayerActed = 0;

            m_Event_Raids = new int[(int)RaidType._COUNT, RogueGame.Options.CitySize, RogueGame.Options.CitySize];
            for (int i = (int)RaidType._FIRST; i < (int)RaidType._COUNT; i++)
            {
                for (int x = 0; x < RogueGame.Options.CitySize; x++)
                {
                    for (int y = 0; y < RogueGame.Options.CitySize; y++)
                    {
                        m_Event_Raids[i, x, y] = -1;
                    }
                }
            }

            ////////////////////////////
            // Reset special properties.
            ////////////////////////////
            this.CHARUndergroundFacility_Activated           = false;
            this.PlayerKnows_CHARUndergroundFacilityLocation = false;
            this.PlayerKnows_TheSewersThingLocation          = false;
            this.ScriptStage_PoliceStationPrisonner          = ScriptStage.STAGE_0;
            this.UniqueActors = new UniqueActors();
            this.UniqueItems  = new UniqueItems();
            this.UniqueMaps   = new UniqueMaps();
        }
	void Start () {

        if (this.VirtualLight == null) return;
        if (this.Stage == null) return;

        this.scriptvirtuallight = this.VirtualLight.GetComponent<script_virtuallight>();
        

        this.scriptstage = this.Stage.GetComponent<ScriptStage>();
        this.Positions = this.scriptstage.Positions;
        this.UV = this.scriptstage.UV;

        this.mesh = new Mesh();

        this.mesh.vertices = this.Positions.ToArray();
        this.mesh.uv = this.UV.ToArray();
        if (this.Indices.Count == 0)
        {
            this.Indices = this.scriptstage.Indices;
        }

        this.mesh.triangles = this.Indices.ToArray();
        this.mesh.RecalculateNormals();
        this.mesh.RecalculateBounds();

        GetComponent<MeshFilter>().sharedMesh = mesh;
        GetComponent<MeshFilter>().sharedMesh.name = "myMeshDummy";

	}
 private ScriptingResult(bool success       = true, object returnValue    = null, IEnumerable <Diagnostic> compilationDiagnostics = null, Exception exception = null, long compilationTime = -1,
                         long executionTime = -1, ScriptStage failedStage = default)
 {
     ReturnValue            = returnValue;
     IsSuccess              = success;
     CompilationDiagnostics = compilationDiagnostics?.ToList();
     Exception              = exception;
     CompilationTime        = compilationTime;
     ExecutionTime          = executionTime;
     FailedStage            = failedStage;
 }
 public static ScriptingResult FromError(Exception exception, ScriptStage failedStage, long compilationTime = -1, long executionTime = -1)
 {
     return(new ScriptingResult(false, exception: exception, compilationTime: compilationTime, executionTime: executionTime, failedStage: failedStage));
 }
 public static ScriptingResult FromError(IEnumerable <Diagnostic> diagnostics, ScriptStage failedStage, Exception exception = null, long compilationTime = -1, long executionTime = -1)
 {
     return(new ScriptingResult(false, compilationDiagnostics: diagnostics, exception: exception, compilationTime: compilationTime, executionTime: executionTime, failedStage: failedStage));
 }