static async Task Main(string[] args) { var exitManager = new ExitManager(); bool createdNew = false; using var m = await Task.Factory.StartNew(() => new Mutex (true, MonitorName, out createdNew), CancellationToken.None, TaskCreationOptions.HideScheduler | TaskCreationOptions.DenyChildAttach, MutexThread.Inst); try { if (createdNew) { await StartApp(args, exitManager); } else { try { await using var client = new NamedPipeClientStream(".", MonitorName, PipeDirection.In, PipeOptions.Asynchronous); await client.ConnectAsync(10000, CancellationToken.None); byte[] data = Encoding.UTF8.GetBytes(new ExposedCommandLineProvider(args).Serialize()); var(message, lenght) = new NetworkMessageFormatter(MemoryPool <byte> .Shared) .WriteMessage(NetworkMessage.Create("Args", data)); using var mem = message; await client.WriteAsync(mem.Memory[..lenght]); }
private void GenerateEnd(Node n) { ExitManager em = Instantiate(endRoom, (Vector2)(n.position * roomSize), Quaternion.identity).GetComponent <ExitManager>(); em.Init(); em.SetExits(n.exits); roomsExit.Add(em); }
private void GenerateRooms(Node n, int difficulty) { List <Room> ad = possiblesRooms.Where(a => a.difficulty == (Room.RoomTag)difficulty).ToList(); ExitManager em = Instantiate(possiblesRooms[Random.Range(0, possiblesRooms.Count)], (Vector2)(n.position * roomSize), Quaternion.identity).GetComponent <ExitManager>(); em.Init(); em.SetExits(n.exits); roomsExit.Add(em.GetComponent <ExitManager>()); }
private void init() { if (!IsCurrentGameState(GameStates.GAMEOVER)) { m_player = GameObject.Find("Player").GetComponent <PlayerScript>(); m_enemyManager = GameObject.Find("Enemy stuff").GetComponent <EnemyManager>(); m_exitManager = GameObject.Find("DoorAndTerminal").GetComponent <ExitManager>(); m_fader = GameObject.Find("FadeCanvas").GetComponent <Fader>(); m_exitManager.init(); } }
public void Awake() { if (instance != null) { Destroy(gameObject); return; } instance = this; DontDestroyOnLoad(gameObject); }
public DbgPsHost(IDebugger debugger, ExitManager exitManager) { _exitManager = exitManager; var consoleColors = new ConsoleColorProxy { ErrorForegroundColor = ConsoleColor.Red, ErrorBackgroundColor = ConsoleColor.Black, WarningForegroundColor = ConsoleColor.Yellow, WarningBackgroundColor = ConsoleColor.Black, DebugForegroundColor = ConsoleColor.Yellow, DebugBackgroundColor = ConsoleColor.Black, VerboseForegroundColor = ConsoleColor.Yellow, VerboseBackgroundColor = ConsoleColor.Black, ProgressForegroundColor = ConsoleColor.Yellow, ProgressBackgroundColor = ConsoleColor.DarkCyan, }; PrivateData = new PSObject(consoleColors); _dbgEngineHostUserInterface = new DbgEngineHostUserInterface(debugger, consoleColors, this); }
void Awake() { Instance = this; }
// Use this for initialization void Start() { ex = GameObject.Find("DespensableScripts").GetComponent <ExitManager> (); }
private void Awake() { exitManager = GameObject.FindGameObjectWithTag("ExitManager").GetComponent <ExitManager>(); }
void Awake() { main = this; }
void Start() { manager = GameObject.Find("theManager").GetComponent <ExitManager>(); }