示例#1
0
 // Use this for initialization
 void Start()
 {
     ES  = GameObject.Find("EternalHolder").GetComponent <EternalScript> ();
     SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> ();
     PCS = GetComponent <PlayerControlScript> ();
     AS  = GetComponent <AmmoScript>();
     AS.SetPrimaryMagazineSize(1);
     AS.SetReloadTime(.5f);
     PCS.SetPrimaryWeapon(Charge);
     ShotTimer         = 0;
     ShootFireCooldown = 15;
     CanShoot          = true;
     projectile        = Resources.Load("SwordPrefab") as GameObject;
 }
示例#2
0
 // Use this for initialization
 void Start()
 {
     ES           = GameObject.Find("EternalHolder").GetComponent <EternalScript> ();
     SPS          = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> ();
     OPProjectile = GameObject.Find("ObjectPoolerFireArrow").GetComponent <ObjectPoolScript> ();
     PCS          = GetComponent <PlayerControlScript> ();
     AS           = GetComponent <AmmoScript>();
     AS.SetPrimaryMagazineSize(3);
     AS.SetReloadTime(1.5f);
     PCS.SetPrimaryWeapon(Shoot);
     ShotTimer         = 0;
     ShootFireCooldown = 15;
     CanShoot          = true;
 }
示例#3
0
 // Use this for initialization
 void Start()
 {
     ES  = GameObject.Find("EternalHolder").GetComponent <EternalScript> ();
     SPS = GameObject.Find("Main Camera").GetComponent <SoundPlayerScript> ();
     PCS = GetComponent <PlayerControlScript> ();
     AS  = GetComponent <AmmoScript>();
     AS.SetPrimaryMagazineSize(3);
     AS.SetReloadTime(2f);
     PCS.SetPrimaryWeapon(Shoot);
     ShotTimer         = 0;
     ShootFireCooldown = 15;
     CanShoot          = true;
     projectile        = Resources.Load("SplitProjectilePrefab") as GameObject;
     Trail             = Resources.Load("ShortTrail") as GameObject;
 }
示例#4
0
 // Use this for initialization
 void Start()
 {
     ES           = GameObject.Find("EternalHolder").GetComponent <EternalScript> ();
     SPS          = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> ();
     OPProjectile = GameObject.Find("ObjectPoolerAssault").GetComponent <ObjectPoolScript> ();
     OPTrail      = GameObject.Find("ObjectPoolerTrailS").GetComponent <ObjectPoolScript> ();
     PCS          = GetComponent <PlayerControlScript> ();
     AS           = GetComponent <AmmoScript>();
     AS.SetPrimaryMagazineSize(15);
     AS.SetReloadTime(2f);
     PCS.SetPrimaryWeapon(Shoot);
     ShotTimer         = 0;
     ShootFireCooldown = 4;
     CanShoot          = true;
     //projectile = Resources.Load ("AssultProjectilePrefab") as GameObject;
     //Trail = Resources.Load ("ShortTrail") as GameObject;
 }
示例#5
0
 // Use this for initialization
 void Start()
 {
     ES           = GameObject.Find("EternalHolder").GetComponent <EternalScript> ();
     SPS          = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> ();
     OPProjectile = GameObject.Find("ObjectPoolerRng").GetComponent <ObjectPoolScript> ();
     OPGrenade    = GameObject.Find("ObjectPoolerGrenadeRng").GetComponent <ObjectPoolScript> ();
     OPTrail      = GameObject.Find("ObjectPoolerTrailS").GetComponent <ObjectPoolScript> ();
     PCS          = GetComponent <PlayerControlScript> ();
     AS           = GetComponent <AmmoScript>();
     AS.SetPrimaryMagazineSize(5);
     AS.SetReloadTime(2f);
     PCS.SetPrimaryWeapon(Shoot);
     ShotTimer         = 0;
     ShootFireCooldown = 20;
     CanShoot          = true;
     projectile        = Resources.Load("RngGunProjectile") as GameObject;
     projectileG       = Resources.Load("GrenadeRngPrefab") as GameObject;
     Trail             = Resources.Load("ShortTrail") as GameObject;
 }
示例#6
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);
 }