Scriptum/Assets/Scripts/REFACTORING/Application/Player/PlayerActions.cs

35 lines
740 B
C#
Raw Normal View History

2022-12-04 18:42:34 +01:00
using System.Collections;
using UnityEngine;
public class PlayerActions : MonoBehaviour
{
// Use this for initialization
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void GetReward(MissionReward reward)
{
// 1. Add items to equipment
foreach(var item in reward.Items)
{
InventoryUIManager.Instance.Add(item);
}
GameObject.FindObjectOfType<SaveController>().SavePlayerEquipmentItems();
GameObject.FindObjectOfType<SaveController>().SavePlayerInventory();
// 2. Add cach
//cash += reward.Cash;
//GameObject.FindObjectOfType<SaveController>().SavePlayerBankAccount();
}
}