This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Events; | |
public class Player : MonoBehaviour | |
{ | |
[SerializeField] private int _maxHealth; | |
private int _health; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
using DG.Tweening; | |
using UnityEngine.Events; | |
public class UI : MonoBehaviour | |
{ | |
[SerializeField] private Button _attackButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Shotgun : Weapon | |
{ | |
public override void Shoot(Transform[] shootPoints) | |
{ | |
foreach (var shootPoint in shootPoints) | |
{ | |
Instantiate(Bullet, shootPoint.position, Quaternion.identity); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void Update() | |
{ | |
Vector2 startCursorPosition = Vector2.zero; | |
if (Input.GetMouseButtonDown(0)) | |
{ | |
startCursorPosition = new Vector2(Input.mousePosition.x, Input.mousePosition.y); | |
} | |
if (Input.GetMouseButton(0)) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Soldier soldier1 = new Soldier("Богдан", "Лейтенант", "Автомат", 20); | |
Soldier soldier2 = new Soldier("Олег", "Полковник", "Ружье", 31); | |
Soldier soldier3 = new Soldier("Борис", "Капитан", "Пистолет", 33); | |
Soldier soldier4 = new Soldier("Олег", "Полковник", "Дробовик", 18); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Soldier soldier1 = new Soldier("Иван", "Лейтенант", "Автомат", 20); | |
Soldier soldier2 = new Soldier("Олег", "Полковник", "Ружье", 31); | |
Soldier soldier3 = new Soldier("Степан", "Рядовой", "Пистолет", 12); | |
Soldier soldier4 = new Soldier("Олег", "Ефрейтор", "Пистолет-пулемет", 12); | |
Soldier soldier5 = new Soldier("Андрей", "Капитан", "Пулемет", 25); | |
Soldier soldier6 = new Soldier("Егор", "Прапорщик", "Дробовик", 18); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int currentYear = 2020; | |
Meat meat1 = new Meat("Микоян", 2008, 5); | |
Meat meat2 = new Meat("Мясофф", 2012, 10); | |
Meat meat3 = new Meat("Колбасы россии", 2016, 5); | |
Meat meat4 = new Meat("Мясной двор", 2003, 8); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
bool isOpen = true; | |
string input; | |
string inputDisease; | |
Patient patient1 = new Patient("Олег", 18, "амнезия"); | |
Patient patient2 = new Patient("Иван", 20, "перелом"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Player player1 = new Player("Олег", 18, 120); | |
Player player2 = new Player("Иван", 20, 80); | |
Player player3 = new Player("Петр", 32, 310); | |
Player player4 = new Player("Евгений", 12, 160); | |
Player player5 = new Player("Александр", 26, 111); | |
Player player6 = new Player("Алексей", 19, 99); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Criminal criminal1 = new Criminal("Дамский угодник", "Антиправительственное"); | |
Criminal criminal2 = new Criminal("Карманник", "Убийство"); | |
Criminal criminal3 = new Criminal("Форточник", "Воровство"); | |
Criminal criminal4 = new Criminal("Серийный убийца", "Антиправительственное"); | |
List<Criminal> criminals = new List<Criminal>() { criminal1, criminal2 , criminal3, criminal4 }; |
NewerOlder