コード例 #1
0
    public void DrawResourceHarvest()
    {
        GameObject           popUpGo = Instantiate(GameManager.Instance.gameAssets.popUpResourceHarvest.gameObject, transform.position + transform.up, Quaternion.identity) as GameObject;
        PopUpResourceHarvest popUp   = popUpGo.GetComponent <PopUpResourceHarvest>();

        popUp.SetImage(resourcesInfos);
        popUp.SetText((int)resourcesInfos.resourcesAmount);
    }
コード例 #2
0
ファイル: Tile.cs プロジェクト: isirda123/5GD_MortalEngine
    public void DrawResourceHarvest()
    {
        GameObject           popUpGo = Instantiate(GameManager.Instance.gameAssets.popUpResourceHarvest.gameObject, transform.position + (transform.up * 0.5f), Quaternion.Euler(45, 0, 0)) as GameObject;
        PopUpResourceHarvest popUp   = popUpGo.GetComponent <PopUpResourceHarvest>();

        popUp.SetImage(resourcesInfos);
        if (resourcesInfos.resourceType == GameManager.ResourceType.Mouflu)
        {
            popUp.SetText((int)resourcesInfos.resourcesAmount + DecretManager.Instance.totalDecreeInfos.collectQuantityMouflu);
        }
        else if (resourcesInfos.resourceType == GameManager.ResourceType.Rock)
        {
            popUp.SetText((int)resourcesInfos.resourcesAmount + DecretManager.Instance.totalDecreeInfos.collectQuantityRock);
        }
        else if (resourcesInfos.resourceType == GameManager.ResourceType.Wood)
        {
            popUp.SetText((int)resourcesInfos.resourcesAmount + DecretManager.Instance.totalDecreeInfos.collectQuantityWood);
        }
        else if (resourcesInfos.resourceType == GameManager.ResourceType.Berry)
        {
            popUp.SetText((int)resourcesInfos.resourcesAmount + DecretManager.Instance.totalDecreeInfos.collectQuantityBerry);
        }
    }