/// <summary> /// Used to check the area directly around the player for walls, ground, and (if ground is found) the type of ground. /// Stores this information in the relevant variables. /// </summary> private void AnalyseEnvironment() { if (detectTerrain != null) { currentTerrain = detectTerrain(); } else { Debug.LogError("detectTerrain Delegate has no functionality assigned to it."); } if (detectMedium != null) { currentMedium = detectMedium(); } else { Debug.LogError("detectMedium Delegate has no functionality assigned to it."); } /* Had to be moved into Fixed Update * if (detectWalls != null) * { * //currentWalls = detectWalls(); * } * else * { * Debug.LogWarning("detectWalls Delegate has no functionality assigned to it."); * }*/ // Implies the player is standing on something if (currentTerrain != TerrainType.None) { grounded = true; } else { grounded = false; } }
private static string ConvertMediumType(MediumType mediumType) { switch (mediumType) { case MediumType.Paper: return(SR.LabelFilmMediumTypePaper); case MediumType.ClearFilm: return(SR.LabelFilmMediumTypeClearFilm); case MediumType.BlueFilm: return(SR.LabelFilmMediumTypeBlueFilm); case MediumType.MammoClearFilm: return(SR.LabelFilmMediumTypeMammoClearFilm); case MediumType.MammoBlueFilm: return(SR.LabelFilmMediumTypeMammoBlueFilm); default: return(mediumType.ToString()); } }
public static string ToStringEx(this MediumType self) { switch (self) { case MediumType.Paper: return("PAPER"); case MediumType.ClearFilm: return("CLEAR FILM"); case MediumType.BlueFilm: return("BLUE FILM"); case MediumType.MammoClearFilm: return("MAMMO CLEAR FILM"); case MediumType.MammoBlueFilm: return("MAMMO BLUE FILM"); default: return("PAPER"); } }
void OnTriggerExit(Collider other) { currentMedium = MediumType.Air; }
void OnTriggerStay(Collider other) { currentMedium = MediumType.Water; }
public async Task <ActionResult <MediumType> > Put(int id, [FromBody] MediumType mediumType) { var medium_type = await mediumTypeService.UpdateMediumType(mediumType); return(Ok(medium_type)); }
public async Task <MediumType> InsertMediumType(MediumType mediumType) { var medium_type = await mediumTypeRepository.InsertMediumType(mediumType); return(medium_type); }
internal static string GetDisplayString(MediumType t) => t.ToString().Replace("MediumType_", "");
public static ColorInfo GetTypeColor(MediumType type) => type switch {