Beispiel #1
0
 public Weapon(ICharacterMain main, IInput input)
 {
     this.input     = input;
     this.obj       = main.obj;
     input.OnShoot += Shoot;
     projectile     = Resources.Load <Projectile>("Projectile");
 }
Beispiel #2
0
 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;
 }
Beispiel #4
0
 public void RemoveUnit(ICharacterMain obj)
 {
     if (InProgress)
     {
         FragCount++;
     }
     enemies.Remove(obj);
 }
Beispiel #5
0
 public CharacterEngine(ICharacterMain main, IInput input)
 {
     speed          = 5;
     speedRotation  = 120;
     this.input     = input;
     this.obj       = main.obj;
     main.OnUpdate += Update;
     main.OnReset  += Reset;
 }
Beispiel #6
0
 public UserInput(ICharacterMain main)
 {
     main.OnUpdate += Update;
     main.OnReset  += Reset;
 }