Exemple #1
0
    public virtual void Awake()
    {
        shipSoundManager = Instantiate(shipSoundManagerClass, transform.localPosition, transform.localRotation, this.transform);

        componentsList = new List <ShipComponent>();

        componentsList.Add(components.movement);
        componentsList.Add(components.engines);
        componentsList.Add(components.gun);
        componentsList.Add(components.system);

        foreach (ShipComponent component in componentsList)
        {
            component.SetParentShip(this);
            component.SetShipSoundManager(shipSoundManager);
        }

        //components.shipSoundManager.InitializeComponent();
        //components.levelSoundManager.InitializeComponent();
    }
Exemple #2
0
 public void SetShipSoundManager(ShipSoundManager sm)
 {
     this.shipSoundManager = sm;
 }