private void Start()
    {
        destructible = GetComponent <Destructible>();
        destructible.OnDeath.AddListener(delegate { GameController.instance.DecreaseSpawnCount(); });
        destructible.OnDeath.AddListener(delegate { GameController.instance.AddKillCount(); });

        destructible.OnHurt.AddListener(delegate { EZCameraShake.CameraShaker.Instance.ShakeOnce(5, 4, 0, 0.2f); });
        destructible.OnHurt.AddListener(delegate { GameController.instance.FreezeFrame(); });

        harpoonGun = GetComponentInChildren <HarpoonGun>();

        player = FindObjectOfType <PlayerController>();
    }
Esempio n. 2
0
    void Awake()
    {
        instance = this;

        FireAS             = gameObject.AddComponent <AudioSource>();
        FireAS.playOnAwake = false;
        FireAS.clip        = FireClip;

        HitAS             = gameObject.AddComponent <AudioSource>();
        HitAS.playOnAwake = false;
        HitAS.clip        = HitClip;

        ReelInAS             = gameObject.AddComponent <AudioSource>();
        ReelInAS.playOnAwake = false;
        ReelInAS.clip        = ReelInClip;

        ReloadAS             = gameObject.AddComponent <AudioSource>();
        ReloadAS.playOnAwake = false;
        ReloadAS.clip        = ReelInClip;
    }
 // Start is called before the first frame update
 void Start()
 {
     harpoonGO = FindObjectOfType <HarpoonGun>();
     Debug.Log("CurrentUpgradeVisual instantiated");
     updateHarpoonReloadVisuals(0, harpoonGO.GetTimeBetweenAttacks(), GameObject.Find("BuyMenu").GetComponent <Shop>().get_UPGRADE_COST());
 }
 // Start is called before the first frame update
 void Start()
 {
     harpoonGO = FindObjectOfType <HarpoonGun>();
     Debug.Log("CurrentUpgradeVisual instantiated");
     updateHarpoonDamageVisuals(0, harpoonGO.GetMaxWeaponDamage(), GameObject.Find("BuyMenu").GetComponent <Shop>().get_UPGRADE_COST());
 }