Exemple #1
0
        private void OnValidate()
        {
            if (!shipComponent)
            {
                shipComponent = GetComponent <Ship>();
            }

            if (!movementComponent)
            {
                movementComponent = GetComponent <EnemyShipMovement>();
            }

            if (!shooterComponent)
            {
                shooterComponent = GetComponent <Shooter>();
            }

            if (!healthComponent)
            {
                healthComponent = GetComponent <Health>();
            }
        }
 public void Initialize(PlayerShipMovement movementComponent, Shooter shooterComponent)
 {
     this.movementComponent = movementComponent;
     this.shooterComponent  = shooterComponent;
     cachedCamera           = Camera.main;
 }