Ejemplo n.º 1
0
	// Use this for initialization
	void Start () {

		if (val == null)
			val = GetComponent<GunSharedValues> ();

		player = GameObject.FindGameObjectWithTag ("Player").transform;

		//ShootRoutine ();
	}
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     if (val == null)
     {
         val = GetComponent <GunSharedValues> ();
     }
     if (val == null)
     {
         val = GetComponentInParent <GunSharedValues> ();
     }
     if (val == null)
     {
         val = GetComponentInChildren <GunSharedValues> ();
     }
 }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        if (val == null)
        {
            val = GetComponent <GunSharedValues> ();
        }
        if (val == null)
        {
            val = GetComponentInParent <GunSharedValues> ();
        }
        if (val == null)
        {
            val = GetComponentInChildren <GunSharedValues> ();
        }

        //MuzzleEffect.SetupPool();
        myLine = GetComponent <LineRenderer> ();
    }
Ejemplo n.º 4
0
    void Start()
    {
        if (val == null)
        {
            val = GetComponent <GunSharedValues> ();
        }

        switch (PlayerPrefs.GetInt("Diff"))
        {
        case 0:
            damageMultiplier = 2f;
            ammoMultiplier   = 2f;
            break;

        case 3:
            damageMultiplier = 0.75f;
            break;

        case 4:
            damageMultiplier   = 1.5f;
            ammoMultiplier     = 2f;
            fireRateMultiplier = 1.5f;
            break;

        default:
            damageMultiplier = 1f;
            break;
        }


        if (myGunCont != null)
        {
            Debug.LogError("there should only be one gun!");
        }
        myGunCont = this;

        anim = GetComponent <Animator> ();
    }