void Awake()
	{
        mat.SetColor("_OutlineColor", Color.green);
        m_CurrentHealth = MAX_HEALTH;
		_BulletManager = GetComponent<Bullet_Manager>();
		m_LineRenderer = GetComponent<LineRenderer>();
		m_Rigidbody = GetComponent<Rigidbody>();
        m_SoundControl = GetComponent<SpaceShip_SoundControl>();


	}
Example #2
0
 // Start is called before the first frame update
 void Start()
 {
     fired                = false;
     ship                 = Instantiate((GameObject)Resources.Load("Prefabs/ship"), new Vector3(0, 0, 0), Quaternion.identity);
     shipScript           = ship.GetComponent <Ship>();
     input                = this.GetComponent <Input_Manager>();
     gui                  = this.GetComponent <GUI_Manager>();
     gui.ShipLives        = 3;
     asteroidM            = this.GetComponent <Asteroid_Manager>();
     bManager             = this.GetComponent <Bullet_Manager>();
     sceneChange          = gameObject.GetComponent <Scene_Changer>();
     screenShake          = Camera.main.GetComponent <ShakeBehavior>();
     isCoroutineExecuting = false;
     AudioSource[] audioSources = GetComponents <AudioSource>();
     source = audioSources[0];
     laser  = audioSources[0].clip;
     crash  = audioSources[1].clip;
 }