protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container) { #warning TODO: values acording to read version (current 2017.3.0f3) YAMLMappingNode node = base.ExportYAMLRoot(container); node.AddSerializedVersion(GetSerializedVersion(container.Version)); node.Add("m_ClearFlags", ClearFlags); node.Add("m_BackGroundColor", BackGroundColor.ExportYAML(container)); node.Add("m_NormalizedViewPortRect", NormalizedViewPortRect.ExportYAML(container)); node.Add("near clip plane", NearClipPlane); node.Add("far clip plane", FarClipPlane); node.Add("field of view", FieldOfView); node.Add("orthographic", Orthographic); node.Add("orthographic size", OrthographicSize); node.Add("m_Depth", Depth); node.Add("m_CullingMask", CullingMask.ExportYAML(container)); node.Add("m_RenderingPath", (int)RenderingPath); node.Add("m_TargetTexture", TargetTexture.ExportYAML(container)); node.Add("m_TargetDisplay", TargetDisplay); node.Add("m_TargetEye", (int)TargetEye); node.Add("m_HDR", HDR); node.Add("m_AllowMSAA", AllowMSAA); node.Add("m_AllowDynamicResolution", AllowDynamicResolution); node.Add("m_ForceIntoRT", ForceIntoRT); node.Add("m_OcclusionCulling", OcclusionCulling); node.Add("m_StereoConvergence", StereoConvergence); node.Add("m_StereoSeparation", StereoSeparation); return(node); }
protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container) { YAMLMappingNode node = base.ExportYAMLRoot(container); node.AddSerializedVersion(GetSerializedVersion(container.ExportVersion)); node.Add(TypeName, (int)Type); node.Add(ModeName, (int)Mode); node.Add(RefreshModeName, (int)RefreshMode); node.Add(TimeSlicingModeName, (int)TimeSlicingMode); node.Add(ResolutionName, Resolution); node.Add(UpdateFrequencyName, UpdateFrequency); node.Add(BoxSizeName, BoxSize.ExportYAML(container)); node.Add(BoxOffsetName, BoxOffset.ExportYAML(container)); node.Add(NearClipName, NearClip); node.Add(FarClipName, FarClip); node.Add(ShadowDistanceName, ShadowDistance); node.Add(ClearFlagsName, (uint)ClearFlags); node.Add(BackGroundColorName, BackGroundColor.ExportYAML(container)); node.Add(CullingMaskName, CullingMask.ExportYAML(container)); node.Add(IntensityMultiplierName, IntensityMultiplier); node.Add(BlendDistanceName, BlendDistance); node.Add(HDRName, HDR); node.Add(BoxProjectionName, BoxProjection); node.Add(RenderDynamicObjectsName, RenderDynamicObjects); node.Add(UseOcclusionCullingName, UseOcclusionCulling); node.Add(ImportanceName, Importance); node.Add(CustomBakedTextureName, CustomBakedTexture.ExportYAML(container)); if (IsReadBakedTexture(container.ExportVersion, container.ExportFlags)) { node.Add(BakedTextureName, BakedTextureTexture.ExportYAML(container)); } return(node); }
protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container) { YAMLMappingNode node = base.ExportYAMLRoot(container); node.AddSerializedVersion(GetSerializedVersion(container.Version)); node.Add(ClearFlagsName, ClearFlags); node.Add(BackGroundColorName, BackGroundColor.ExportYAML(container)); // 2018 node.Add(ProjectionMatrixModeName, (int)ProjectionMatrixMode); node.Add(SensorSizeName, SensorSize.ExportYAML(container)); node.Add(LensShiftName, LensShift.ExportYAML(container)); node.Add(FocalLengthName, FocalLength); node.Add(NormalizedViewPortRectName, NormalizedViewPortRect.ExportYAML(container)); node.Add(NearClipPlaneName, NearClipPlane); node.Add(FarClipPlaneName, FarClipPlane); node.Add(FieldOfViewName, FieldOfView); node.Add(OrthographicName, Orthographic); node.Add(OrthographicSizeName, OrthographicSize); node.Add(DepthName, Depth); node.Add(CullingMaskName, CullingMask.ExportYAML(container)); node.Add(RenderingPathName, (int)RenderingPath); node.Add(TargetTextureName, TargetTexture.ExportYAML(container)); node.Add(TargetDisplayName, TargetDisplay); node.Add(TargetEyeName, (int)TargetEye); node.Add(HDRName, HDR); node.Add(AllowMSAAName, AllowMSAA); node.Add(AllowDynamicResolutionName, AllowDynamicResolution); node.Add(ForceIntoRTName, ForceIntoRT); node.Add(OcclusionCullingName, OcclusionCulling); node.Add(StereoConvergenceName, StereoConvergence); node.Add(StereoSeparationName, StereoSeparation); return(node); }
public void BackGroundColorChange(BackGroundColor color) { Color changecolor = new Color(); switch (color) { case BackGroundColor.Fire: changecolor.a = 1; changecolor.r = 0.5f; changecolor.g = 0; changecolor.b = 0.1f; backGroundObj.color = changecolor; break; case BackGroundColor.Ice: changecolor.a = 1; changecolor.r = 0.05f; changecolor.g = 0.1f; changecolor.b = 0.1f; backGroundObj.color = changecolor; break; case BackGroundColor.Thunder: backGroundObj.color = Color.black; break; case BackGroundColor.Esper: backGroundObj.color = Color.black; break; } }
public General(string header, GlobalLight globalLight, Fog fog, BackGroundColor backGroundColor, Frustum frustum, DirectionLightAmbient directionLightAmbient, DirectionLightDiffuse directionLightDiffuse) { Header = header; GlobalLight = globalLight; Fog = fog; BackGroundColor = backGroundColor; Frustum = frustum; DirectionLightAmbient = directionLightAmbient; DirectionLightDiffuse = directionLightDiffuse; }
public override int GetHashCode() { var hashCode = 679998008; hashCode = hashCode * -1521134295 + Data.GetHashCode(); hashCode = hashCode * -1521134295 + TextColor.GetHashCode(); hashCode = hashCode * -1521134295 + BackGroundColor.GetHashCode(); hashCode = hashCode * -1521134295 + RePaint.GetHashCode(); hashCode = hashCode * -1521134295 + Empty.GetHashCode(); return(hashCode); }
public override void Read(AssetStream stream) { base.Read(stream); ClearFlags = stream.ReadUInt32(); BackGroundColor.Read(stream); if (IsReadProjectionMatrixMode(stream.Version)) { ProjectionMatrixMode = (ProjectionMatrixMode)stream.ReadInt32(); SensorSize.Read(stream); LensShift.Read(stream); FocalLength = stream.ReadSingle(); } NormalizedViewPortRect.Read(stream); NearClipPlane = stream.ReadSingle(); FarClipPlane = stream.ReadSingle(); FieldOfView = stream.ReadSingle(); Orthographic = stream.ReadBoolean(); stream.AlignStream(AlignType.Align4); OrthographicSize = stream.ReadSingle(); Depth = stream.ReadSingle(); CullingMask.Read(stream); if (IsReadRenderingPath(stream.Version)) { RenderingPath = (RenderingPath)stream.ReadInt32(); } TargetTexture.Read(stream); if (IsReadTargetDisplay(stream.Version)) { TargetDisplay = stream.ReadInt32(); } if (IsReadTargetEye(stream.Version)) { TargetEye = (StereoTargetEyeMask)stream.ReadInt32(); } if (IsReadHDR(stream.Version)) { HDR = stream.ReadBoolean(); } if (IsReadAllowMSAA(stream.Version)) { AllowMSAA = stream.ReadBoolean(); } if (IsReadAllowDynamicResolution(stream.Version)) { AllowDynamicResolution = stream.ReadBoolean(); } if (IsReadForceIntoRT(stream.Version)) { ForceIntoRT = stream.ReadBoolean(); } if (IsReadOcclusionCulling(stream.Version)) { OcclusionCulling = stream.ReadBoolean(); } if (IsAlign(stream.Version)) { stream.AlignStream(AlignType.Align4); } if (IsReadStereoConvergence(stream.Version)) { StereoConvergence = stream.ReadSingle(); StereoSeparation = stream.ReadSingle(); } if (IsReadStereoMirrorMode(stream.Version)) { StereoMirrorMode = stream.ReadBoolean(); } }
public override void Read(AssetReader reader) { base.Read(reader); ClearFlags = reader.ReadUInt32(); BackGroundColor.Read(reader); if (HasProjectionMatrixMode(reader.Version)) { ProjectionMatrixMode = (ProjectionMatrixMode)reader.ReadInt32(); } if (HasGateFitMode(reader.Version)) { if (HasGateFitModeFirst(reader.Version)) { GateFitMode = (GateFitMode)reader.ReadInt32(); } } #if UNIVERSAL if (HasFOVAxisMode(reader.Version, reader.Flags)) { FOVAxisMode = (FieldOfViewAxis)reader.ReadInt32(); } #endif if (IsAlign1(reader.Version)) { reader.AlignStream(); } if (HasSensorSize(reader.Version)) { SensorSize.Read(reader); LensShift.Read(reader); } if (HasGateFitMode(reader.Version)) { if (!HasGateFitModeFirst(reader.Version)) { GateFitMode = (GateFitMode)reader.ReadInt32(); } } if (HasFocalLength(reader.Version)) { FocalLength = reader.ReadSingle(); } NormalizedViewPortRect.Read(reader); NearClipPlane = reader.ReadSingle(); FarClipPlane = reader.ReadSingle(); FieldOfView = reader.ReadSingle(); Orthographic = reader.ReadBoolean(); reader.AlignStream(); OrthographicSize = reader.ReadSingle(); Depth = reader.ReadSingle(); CullingMask.Read(reader); if (HasRenderingPath(reader.Version)) { RenderingPath = (RenderingPath)reader.ReadInt32(); } TargetTexture.Read(reader); if (HasTargetDisplay(reader.Version)) { TargetDisplay = reader.ReadInt32(); } if (HasTargetEye(reader.Version)) { TargetEye = (StereoTargetEyeMask)reader.ReadInt32(); } if (HasHDR(reader.Version)) { HDR = reader.ReadBoolean(); } if (HasAllowMSAA(reader.Version)) { AllowMSAA = reader.ReadBoolean(); } if (HasAllowDynamicResolution(reader.Version)) { AllowDynamicResolution = reader.ReadBoolean(); } if (HasForceIntoRT(reader.Version)) { ForceIntoRT = reader.ReadBoolean(); } if (HasOcclusionCulling(reader.Version)) { OcclusionCulling = reader.ReadBoolean(); } if (IsAlign2(reader.Version)) { reader.AlignStream(); } if (HasStereoConvergence(reader.Version)) { StereoConvergence = reader.ReadSingle(); StereoSeparation = reader.ReadSingle(); } if (HasStereoMirrorMode(reader.Version)) { StereoMirrorMode = reader.ReadBoolean(); } }
public override void Read(AssetReader reader) { base.Read(reader); Type = (ReflectionProbeType)reader.ReadInt32(); Mode = (ReflectionProbeMode)reader.ReadInt32(); if (IsReadRefreshMode(reader.Version)) { RefreshMode = (ReflectionProbeRefreshMode)reader.ReadInt32(); TimeSlicingMode = (ReflectionProbeTimeSlicingMode)reader.ReadInt32(); } Resolution = reader.ReadInt32(); UpdateFrequency = reader.ReadInt32(); if (IsReadImportance(reader.Version)) { if (IsReadImportanceFirst(reader.Version)) { Importance = reader.ReadInt16(); } } BoxSize.Read(reader); BoxOffset.Read(reader); NearClip = reader.ReadSingle(); FarClip = reader.ReadSingle(); ShadowDistance = reader.ReadSingle(); ClearFlags = (ReflectionProbeClearFlags)reader.ReadUInt32(); BackGroundColor.Read(reader); CullingMask.Read(reader); IntensityMultiplier = reader.ReadSingle(); if (IsReadBlendDistance(reader.Version)) { BlendDistance = reader.ReadSingle(); } if (IsReadBakedRenderPassCount(reader.Version)) { BakedRenderPassCount = reader.ReadUInt32(); UseMipMap = reader.ReadBoolean(); } HDR = reader.ReadBoolean(); if (IsReadBoxProjection(reader.Version)) { BoxProjection = reader.ReadBoolean(); RenderDynamicObjects = reader.ReadBoolean(); UseOcclusionCulling = reader.ReadBoolean(); } if (IsReadImportance(reader.Version)) { if (!IsReadImportanceFirst(reader.Version)) { Importance = reader.ReadInt16(); } } reader.AlignStream(AlignType.Align4); if (IsReadCustomBakedTexture(reader.Version)) { CustomBakedTexture.Read(reader); } if (IsReadBakedTexture(reader.Version, reader.Flags)) { BakedTextureTexture.Read(reader); } }
//Method for starting the app public static void start() { Console.WriteLine("----------------------------"); Console.WriteLine("Choose one of the following options: "); Console.WriteLine("1. Your name \n2. Your name is \n3. Sum of two values \n4. Calculator \n5. Lottery \n6. Rock Paper Scissor \n7. Change background color \n8. Guess game \n9. Quiz \n10. Exit the program"); Console.WriteLine("----------------------------"); //Switch statement for displaying the menu switch (Console.ReadLine()) { case "1": Console.Clear(); name.enterName(); start(); break; case "2": Console.Clear(); name.getName(); start(); break; case "3": getValues(); break; case "4": Console.Clear(); var calculator = new Calculator(); calculator.Calculate(); start(); break; case "5": var gamble = new Lottery(); Console.Clear(); gamble.start(); break; case "6": Console.Clear(); var rockPaperS = new RockPaperScissors(); rockPaperS.PlayRockPaperScissors(); start(); break; case "7": Console.Clear(); var cs = new BackGroundColor(); cs.ColorChange(); start(); break; case "8": Console.Clear(); var guessGame = new GuessGame(); guessGame.Game(); start(); break; case "9": Console.Clear(); var quiz = new Quiz(); quiz.PlayQuiz(); start(); break; case "10": Environment.Exit(-1); break; default: Console.Clear(); Console.WriteLine("That's an invalid input try again! \n"); start(); break; } }