void Update() { if (Input.GetKeyDown(KeyCode.Q)) { CreateAlert(new AlertData("TEST ALERT", IconRegistry.GetIcon(IconRegistry.WarningIcons, 0)), AlertColorArray.Green); } }
private void InitializeIconRegistry() { _iconRegistry = new IconRegistry(); _iconRegistry.DefaultIcon = 15; _iconRegistry.Register(typeof(TagByteDataNode), 0); _iconRegistry.Register(typeof(TagShortDataNode), 1); _iconRegistry.Register(typeof(TagIntDataNode), 2); _iconRegistry.Register(typeof(TagLongDataNode), 3); _iconRegistry.Register(typeof(TagFloatDataNode), 4); _iconRegistry.Register(typeof(TagDoubleDataNode), 5); _iconRegistry.Register(typeof(TagByteArrayDataNode), 6); _iconRegistry.Register(typeof(TagStringDataNode), 7); _iconRegistry.Register(typeof(TagListDataNode), 8); _iconRegistry.Register(typeof(TagCompoundDataNode), 9); _iconRegistry.Register(typeof(RegionChunkDataNode), 9); _iconRegistry.Register(typeof(DirectoryDataNode), 10); _iconRegistry.Register(typeof(RegionFileDataNode), 11); _iconRegistry.Register(typeof(CubicRegionDataNode), 11); _iconRegistry.Register(typeof(NbtFileDataNode), 12); _iconRegistry.Register(typeof(TagIntArrayDataNode), 14); _iconRegistry.Register(typeof(TagShortArrayDataNode), 16); _iconRegistry.Register(typeof(TagLongArrayDataNode), 17); _iconRegistry.Register(typeof(RootDataNode), 18); }
public ExplorerBarController(ToolStrip toolStrip, IconRegistry registry, ImageList iconList, DataNode rootNode) { _explorerStrip = toolStrip; _registry = registry; _iconList = iconList; _rootNode = rootNode; Initialize(); }
private void InitializeIconRegistry() { _iconRegistry = new IconRegistry(); _iconRegistry.DefaultIcon = 15; _iconRegistry.Register(typeof(RootRule), 18); _iconRegistry.Register(typeof(UnionRule), 21); _iconRegistry.Register(typeof(IntersectRule), 20); _iconRegistry.Register(typeof(WildcardRule), 19); _iconRegistry.Register(typeof(ByteTagRule), 0); _iconRegistry.Register(typeof(ShortTagRule), 1); _iconRegistry.Register(typeof(IntTagRule), 2); _iconRegistry.Register(typeof(LongTagRule), 3); _iconRegistry.Register(typeof(FloatTagRule), 4); _iconRegistry.Register(typeof(DoubleTagRule), 5); _iconRegistry.Register(typeof(StringTagRule), 7); }
void Awake() { if (m_Instance == null) { m_Instance = this; } else if (!m_ExceptionFlag) { m_ExceptionFlag = true; string activeControllers = "GameObject(s) with GameController component(s)\n" + "--------------------------------------\n"; foreach (var cont in GameObject.FindObjectsOfType(typeof(GameController))) { activeControllers += "\"" + cont.name + "\"\n"; } Debug.Break(); Debug.LogError(activeControllers); throw new UnityException("Please ensure there is only one active gameController in the scene"); } if (m_MainPlayer == null) { m_MainPlayer = GameObject.FindGameObjectWithTag("Player"); } m_EnemyController = GetComponent <EnemyController>(); m_EnemySpawner = GetComponent <EnemySpawner>(); m_TextController = GetComponent <TextController>(); // Initialize the IconRegistry since it's a static class that doesn't inherit from MonoBehaviour IconRegistry.LoadIcons(); // Find all doors in scene and add to list foreach (Door d in FindObjectsOfType(typeof(Door))) { m_Doors.Add(d); } }
void Start() { Instance = this; }
public static void EnemyEscapedAlert(string enemyName, int quantity = 1) { GameController.Current.TC.CreateAlert(new AlertData(quantity + " " + enemyName + "(s) have escaped from prison!", IconRegistry.GetIcon(IconRegistry.AlertIcons, 0)), AlertColorArray.Red); }
public static void StarfishEscapeWarningAlert(int seconds) { GameController.Current.TC.CreateAlert(new AlertData("Starfish will escape from jail in " + seconds + " seconds!", IconRegistry.GetIcon(IconRegistry.WarningIcons, 0)), AlertColorArray.Yellow); }
public static void StarfishBreakoutAlert() { GameController.Current.TC.CreateAlert(new AlertData("Starfish is going to break an enemy out of prison!", IconRegistry.GetIcon(IconRegistry.WarningIcons, 0)), AlertColorArray.Yellow); }