Example #1
0
    // Start is called before the first frame update
    void Start()
    {
        getAnimator();
        facingRight = false;
        // a backup condition to get the right speed
        Rodent r = this.GetComponent <Rodent>();

        if (r)
        {
            moveSpeed = r.getSpeed();
        }

        WaitDuration = 10f;

        testSwap();
        townCenterLoc        = GameManager.Instance.getTownCenter().transform.gameObject;
        isRanged             = this.GetComponent <Rodent>().isRanged();
        projectileSpawnPoint = gameObject.transform.Find("ProjectileSpawn");
    }