Пример #1
0
    // activate means start shooting
    public void activate()
    {
        GameObject          moneyAddObj    = Instantiate(moneyAdd);
        MoneyAddedBehaviour moneyAddBehave = moneyAddObj.GetComponent <MoneyAddedBehaviour>();

        hasTarget       = false;
        shootTimer      = property.fireRate;
        currentPosition = this.transform.position;
        isActive        = true;
        circle.SetActive(false);
        totalFire = 5;
        moneyAddBehave.activateMinus((int)GameManager.instance.getPrice(property.type), currentPosition);
    }
Пример #2
0
    //activate
    public void activate()
    {
        if (property.type == TrapType.TIME_TRAP)
        {
            audioSource.Play();
        }

        GameObject          moneyAddObj    = Instantiate(moneyAdd);
        MoneyAddedBehaviour moneyAddBehave = moneyAddObj.GetComponent <MoneyAddedBehaviour>();

        currentPosition = this.gameObject.transform.position;
        isActive        = true;
        moneyAddBehave.activateMinus((int)GameManager.instance.getPrice(property.type), currentPosition);
    }