Example #1
0
    // Start is called before the first frame update
    void Start()
    {
        _self      = gameObject.GetComponent <Actor>();
        _motor     = gameObject.GetComponent <ForceMotor>();
        _weapon    = gameObject.GetComponent <Weapon>();
        _damagable = gameObject.GetComponent <Damagable>();

        _damagable.OnDamaged.AddListener(Attacked);
    }
Example #2
0
 // Start is called before the first frame update
 void Start()
 {
     _motor = gameObject.GetComponent <ForceMotor>();
     _motor.SetTarget(TopOfScreen, 1, 2);
 }