This file contains hidden or 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.Text; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Order order = new Order(2312342, 10); | |
PaymentSystem1 system1 = new PaymentSystem1(); | |
Console.WriteLine(system1.GetPayingLink(order)); |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
namespace Lesson | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
namespace Lesson | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
namespace ConsoleApp1 | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Product iPhone12 = new Product("IPhone 12"); |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
namespace ConsoleApp1 | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Good iPhone12 = new Good("IPhone 12"); |
This file contains hidden or 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; | |
class Weapon | |
{ | |
private const int ShotPrice = 1; | |
private int _damage = 1; | |
private int _bullets = 100; | |
public int Damage => _damage; |
This file contains hidden or 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 Weapon | |
{ | |
public int Damage { get; private set; } | |
public int Bullets { get; private set; } | |
public void Fire(Player player) | |
{ | |
player.TakeDamage(Damage); | |
Bullets -= 1; | |
} |
This file contains hidden or 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 PlayerInputReader : MonoBehaviour | |
{ | |
private InputSystem_Actions _inputSystem; | |
public Vector2 MoveDirection { get; private set; } | |
private void Update() | |
{ | |
MoveDirection = _inputSystem.Player.Move.ReadValue<Vector2>(); | |
} | |
} |
This file contains hidden or 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 UnityEngine; | |
public class PlayerInputReader : MonoBehaviour | |
{ | |
private InputSystem_Actions _inputSystem; | |
private PlayerMover _playerMover; | |
private void Update() | |
{ |
This file contains hidden or 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 UnityEngine; | |
[RequireComponent(typeof(Rigidbody2D))] | |
public class PlayerMover : MonoBehaviour | |
{ | |
[SerializeField] private PlayerInput _input; | |
[SerializeField] private GroundChecker _groundChecker; | |
[Header("Settings")] | |
[SerializeField] private float _speed; |