예제 #1
0
 // Use this for initialization
 void Start()
 {
     ES           = GameObject.Find("EternalHolder").GetComponent <EternalScript> ();
     PCS          = GetComponent <PlayerControlScript> ();
     SPS          = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> ();
     OPProjectile = GameObject.Find("ObjectPoolerLazer").GetComponent <ObjectPoolScript> ();
     particlesOBJ = Resources.Load("ChargeParticleHolder") as GameObject;
     AS           = GetComponent <AmmoScript>();
     AS.SetPrimaryMagazineSize(6);
     AS.SetReloadTime(3f);
     PCS.SetPrimaryWeapon(Charge);
     PCS.SetPrimaryWeaponRelease(Shoot);
     ShotTimer                  = 0;
     chargeLevel                = 1;
     ShootFireCooldown          = 7;
     CanShoot                   = true;
     particlesOBJ               = Instantiate(particlesOBJ, transform.position, transform.rotation) as GameObject;
     particlesSystem            = particlesOBJ.GetComponentInChildren <ParticleSystem> ();
     particlesSystem.startColor = ES.GetColor(PCS.GetPlayerNum());
     particlesOBJ.SetActive(false);
 }