コード例 #1
0
    public void SetTarget(Red_Node _target)
    {
        target = _target;

        transform.position = target.GetBuildPosition();
        ui.SetActive(true);

        sellAmount.text = "Sell\n" + "$" + target.turretBlueprint.GetSellAmount();
    }
コード例 #2
0
    public void BuildTurretOn(Red_Node node)
    {
        if (RedPlayerStats.Money < turretToBuild.cost)
        {
            Debug.Log("Not enough money to build turret!!");
            return;
        }

        RedPlayerStats.Money -= turretToBuild.cost;

        GameObject turret = (GameObject)Instantiate(turretToBuild.prefab, node.GetBuildPosition(), Quaternion.identity);

        node.turret = turret;

        Debug.Log("Money Left:" + RedPlayerStats.Money);
    }