Ejemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     sgs = GameObject.Find("shotgun Variant").GetComponent <ShotgunScript>();
     mgs = GameObject.Find("machinegun").GetComponent <machineGunScript>();
     sns = GameObject.Find("sniper").GetComponent <SniperScript>();
     ChooseGun();
 }
Ejemplo n.º 2
0
 void OnCollisionEnter(Collision collision)
 {
     if (collision.gameObject.name == "Player")
     {
         SniperScript sgs = collision.transform.Find("Head").transform.Find("sniper").GetComponent <SniperScript>();
         sgs.totalAmmo += ammoAmmount;
         sgs.SendMessage("UpdateAmmo");
         Destroy(gameObject);
     }
 }
Ejemplo n.º 3
0
    protected override void ApplyTalent()
    {
        if (Tower.PlayerSelectedTower.TowerType != TowerType.Sniper)
        {
            return;
        }

        SniperScript sniper = Tower.PlayerSelectedTower as SniperScript;

        sniper.ApplyConcussion = true;
    }