public Weapon(ICharacterMain main, IInput input) { this.input = input; this.obj = main.obj; input.OnShoot += Shoot; projectile = Resources.Load <Projectile>("Projectile"); }
public AiInput(ICharacterMain main) { obj = main.obj; stopDistance = UnityEngine.Random.Range(2f, 6f); target = GameObject.FindGameObjectWithTag("Player"); main.OnUpdate += Update; }
public CharacterHealth(ICharacterMain main, int maxHealth) { obj = main.obj; health = this.maxHealth = maxHealth; main.onTriggerEnter += OnTriggerEnter2D; main.OnReset += Reset; }
public void RemoveUnit(ICharacterMain obj) { if (InProgress) { FragCount++; } enemies.Remove(obj); }
public CharacterEngine(ICharacterMain main, IInput input) { speed = 5; speedRotation = 120; this.input = input; this.obj = main.obj; main.OnUpdate += Update; main.OnReset += Reset; }
public UserInput(ICharacterMain main) { main.OnUpdate += Update; main.OnReset += Reset; }