private void MainLoop(object sender, ElapsedEventArgs e) { // MOVING Player.MoveHero(); if (_npcTime) { InvokeNPCs(); } // INVOKING BULLETS InvokeBullets(); // SHOOTING if (_npcTime) { InvokeNPCs(shoot: true); } Player.Shoot(); // RENDERING THE MAP _npcTime = !_npcTime; FieldViewer.GetInstance().Render(); // CHECK IF THE GAME IS OVER if (NPCs.Count == 0 || GameState.Died()) { GameState.Win(); StopTheGame(); } }
private void Awake() { m_fieldController = GetComponent <FieldController>(); m_fieldViewer = GetComponent <FieldViewer>(); m_backgroundsParent = Instantiate(m_backgroundsParent); m_backgroundsParent.transform.SetParent(transform); }
public override void OnLeftClickDown() { if (card.container == card.controller.hand && !is_targeting) { field_viewer = card.controller.field.GetComponent <FieldViewer>(); hand_viewer = card.controller.hand.GetComponent <HandViewer>(); attach_to_mouse = StartCoroutine(AttachToMouse()); } }
private void MenuItem_Click_4(object sender, RoutedEventArgs e) { FieldViewer viewer = new FieldViewer(new Campo() { nombre = "campo " + items, descripcion = "descripcion", id = items, tipo = Campo.TiposDeCampo.OpcionesExclusivas }); fields.Children.Add(viewer); viewer.Focus(); items++; }
private void MenuItem_Click(object sender, System.Windows.RoutedEventArgs e) { FieldViewer viewer = new FieldViewer(new Campo() { nombre = "campo " + items, descripcion = "descripcion", id = items, tipo = Campo.TiposDeCampo.Texto }); fields.Children.Add(viewer); viewer.Focus(); items++; saved = false; }
private void MainLoop() { while (!GameOver) { // IF THE OPPONENT IS NOT ONLINE if (!CheckOpponentOnline()) { StopTheGame(); break; } // MOVING Communicate(SocketCommunication.ReceiveMove); Opponent.MoveHero(); Communicate(SocketCommunication.SendMove, Player.MoveHero()); if (_npcTime) { InvokeNPCs(); } // INVOKING BULLETS InvokeBullets(); // SHOOTING if (_npcTime) { InvokeNPCs(shoot: true); } Communicate(SocketCommunication.ReceiveShoot); Opponent.Shoot(); Communicate(SocketCommunication.SendShoot, Player.Shoot()); // RENDERING THE MAP _npcTime = !_npcTime; FieldViewer.GetInstance().Render(); } }
private void MainLoop(object sender, ElapsedEventArgs e) { // IF THE OPPONENT IS NOT ONLINE if (!CheckOpponentOnline()) { StopTheGame(); return; } // MOVING Communicate(SocketCommunication.SendMove, Player.MoveHero()); Communicate(SocketCommunication.ReceiveMove); Opponent.MoveHero(); if (_npcTime) { InvokeNPCs(shoot: false); } // INVOKING BULLETS InvokeBullets(); // SHOOTING if (_npcTime) { InvokeNPCs(shoot: true); } Communicate(SocketCommunication.SendShoot, Player.Shoot()); Communicate(SocketCommunication.ReceiveShoot); Opponent.Shoot(); // RENDERING THE MAP _npcTime = !_npcTime; FieldViewer.GetInstance().Render(); // RESTARTING THE TIMER GameTimer.StartTimer(); }
private void Awake() { m_fieldController = GetComponent <FieldController>(); m_fieldViewer = GetComponent <FieldViewer>(); m_audio = GetComponent <FieldAudio>(); }