/// <summary> /// Handles all messages sent to this spawn point with gameobjects in the message /// </summary> /// <param name="MSG">the message</param> /// <param name="OBJ">the object to be used</param> public void OnMessageRecieved(string MSG, GameObject OBJ) { IDebug.DebugVerbose("\"" + this.name + "\" has recieved a message: \"" + MSG + "\" with gameobject \"" + OBJ.name + "\"."); if (MSG == "SPAWN_TOWER") { SPAWNTOWER_MSG(OBJ); } }
/// <summary> /// Handles all messages sent to this spawn point with a bool in the message /// </summary> /// <param name="MSG">the message</param> /// <param name="OBJ">the object to be used</param> public void OnMessageRecieved(string MSG, bool T_F) { IDebug.DebugVerbose("\"" + this.name + "\" has recieved a message: \"" + MSG + "\" with bool \"" + T_F + "\"."); if (MSG == "HIGHLIGHT") { HIGHLIGH_MSG(T_F); } }
/// <summary> /// Handles all messages recieved with a vector in the message /// </summary> /// <param name="MSG">The message</param> /// <param name="POS">The position attached to the message</param> public void OnRecieveMessage(string MSG, Vector3 POS, TowerSpawnPoint TSP) { IDebug.DebugVerbose("\"" + this.name + "\" has recieved a message: \"" + MSG + "\" with vector \"" + POS + "\"."); m_currentTowerSpawnPoint = TSP; if (MSG == "MOVE_TOWER_UI") { MOVETOWERUI(POS); } }
/// <summary> /// Handles all query messages /// </summary> /// <param name="IDToQuery"></param> public void OnMessageRecieved(int IDToQuery, TowerSpawnPoint TSP) { IDebug.DebugVerbose("\"" + this.name + "\" has recieved a message: \"" + IDToQuery + "\" with TowerSpawnPoint \"" + TSP.name + "\"."); GameObject Obj; try { Obj = Database[IDToQuery]; } catch { IDebug.LogError("TowerDatabaseManager (\"" + this.name + "\") does not have a entry with the ID \"" + IDToQuery + "\"."); return; } MsgJunction.instance.SendTowerSpawnMsg("SPAWN_TOWER", TSP, Obj); }