// 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.SetSecondaryMagazineSize(2); PCS.SetSecondaryWeapon(ShootOutline); PCS.SetSecondaryWeaponRelease(Shoot); CanShoot = true; projectile = Resources.Load("ShieldPrefab") as GameObject; POutline = Instantiate(projectile, Vector3.zero, Quaternion.identity) as GameObject; Color CtoChange = ES.GetColor(PCS.GetPlayerNum()); CtoChange.a = .75f; POutline.GetComponent <SpriteRenderer> ().color = CtoChange; POutline.SetActive(false); }
// Use this for initialization void Start() { ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); PCS = GetComponent <PlayerControlScript> (); SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); OPProjectile = GameObject.Find("ObjectPoolerGrenade").GetComponent <ObjectPoolScript> (); OPTrail = GameObject.Find("ObjectPoolerTrailS").GetComponent <ObjectPoolScript> (); AS = GetComponent <AmmoScript>(); AS.SetSecondaryMagazineSize(2); PCS.SetSecondaryWeapon(Cook); PCS.SetSecondaryWeaponRelease(Shoot); ShotTimer = 0; CookTime = 0; ShootFireCooldown = 50; CanShoot = true; projectile = Resources.Load("GrenadePrefab") as GameObject; Trail = Resources.Load("ShortTrail") as GameObject; GrenadeDetonateTime = projectile.GetComponent <ProjectileScript> ().SelfDestruct; }