Hey guys,
i need a little help:
i just got a project which a friend of me coded and i just want to translate the GUI-part to playmaker. So i have to get the public int _money to an global FSM variable but i dont know how to do that.
here a litte piece of the code:
using UnityEngine;
using System.Collections;
using HutongGames.PlayMaker;
public class money : MonoBehaviour {
public int _money;
// Update is called once per frame
void Update () {
int t, h, z, e, m;
weapons sendMoney= gameObject.GetComponent<weapons>();
sendMoney.reciveMoney(_money);
t = _money/1000;
h = _money%1000;
h = h/100;
z = _money%1000;
z = z%100;
z = z/10;
e = _money%10;
}
public void getMoney(int amt){
_money += amt;
}
public void looseMoney(int amt){
_money -= amt;
}
}
So how do i get the _money to a Global FSM variable?
thanks in advance!