Пример #1
0
 // Use this for initialization
 void Start()
 {
     PCS = GetComponent <PlayerControlScript> ();
     AS  = GetComponent <AmmoScript>();
     AS.SetSecondaryMagazineSize(3);
     PCS.SetSecondaryWeapon(Shoot);
     ShotTimer         = 0;
     ShootFireCooldown = 50;
     CanShoot          = true;
     projectile        = Resources.Load("ChaffPrefab") 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("ObjectPoolerTripMine").GetComponent <ObjectPoolScript> ();
     PCS          = GetComponent <PlayerControlScript> ();
     AS           = GetComponent <AmmoScript>();
     AS.SetSecondaryMagazineSize(2);
     PCS.SetSecondaryWeapon(Shoot);
     ShotTimer         = 0;
     ShootFireCooldown = 25;
     CanShoot          = true;
 }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     PCS = GetComponent <PlayerControlScript> ();
     SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> ();
     OP  = GameObject.Find("ObjectPoolerIntercept").GetComponent <ObjectPoolScript> ();
     AS  = GetComponent <AmmoScript>();
     AS.SetSecondaryMagazineSize(2);
     PCS.SetSecondaryWeapon(Shoot);
     ShotTimer         = 0;
     ShootFireCooldown = 50;
     CanShoot          = true;
     projectile        = Resources.Load("InterCeptorPrefab") as GameObject;
 }
Пример #4
0
 // Use this for initialization
 void Start()
 {
     ES  = GameObject.Find("EternalHolder").GetComponent <EternalScript> ();
     PCS = GetComponent <PlayerControlScript> ();
     SPS = GameObject.Find("Main Camera").GetComponent <SoundPlayerScript> ();
     AS  = GetComponent <AmmoScript>();
     AS.SetSecondaryMagazineSize(2);
     PCS.SetSecondaryWeapon(Shoot);
     ShotTimer         = 0;
     ShootFireCooldown = 50;
     CanShoot          = true;
     projectile        = Resources.Load("KnifeProjectilePrefab") as GameObject;
 }
Пример #5
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.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);
    }
Пример #6
0
 // Use this for initialization
 void Start()
 {
     ES  = GameObject.Find("EternalHolder").GetComponent <EternalScript> ();
     PCS = GetComponent <PlayerControlScript> ();
     SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> ();
     AS  = GetComponent <AmmoScript>();
     AS.SetSecondaryMagazineSize(2);
     PCS.SetSecondaryWeapon(Shoot);
     ShotTimer         = 0;
     ShootFireCooldown = 10;
     CanShoot          = true;
     ProjectileWrapper = Resources.Load("WallProjectileWrapper") as GameObject;
     ProjectileWrapper = Instantiate(ProjectileWrapper, Vector3.zero, Quaternion.identity) as GameObject;
     PrimaryBullet     = ProjectileWrapper.transform.GetChild(0).gameObject;
     SecondaryBullet   = ProjectileWrapper.transform.GetChild(1).gameObject;
     WPS = PrimaryBullet.GetComponent <WallProjectileScript> ();
     PrimaryBullet.SetActive(false);
     SecondaryBullet.SetActive(false);
 }
Пример #7
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("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;
 }