コード例 #1
0
ファイル: GUIHelpers.cs プロジェクト: jannavarro/prototypes
    internal static bool DrawTrainStaffMenu(StaffComponent staffComponent, PlayerManager _pm)
    {
        bool res = true;
            GUI.Box(getRect(SMLBOXBUFFERWIDTH,SMLBOXBUFFERWIDTH), "");
            GUILayout.BeginArea(getRect(SMLBOXBUFFERWIDTH, SMLBOXBUFFERWIDTH));
            GUILayout.BeginVertical();
            GUILayout.Label("Train");
            foreach(Training t in GameValues.Training){
                GUILayout.BeginHorizontal();
            if (GUILayout.Button(new GUIContent(t.Name,t.Description))) {
                if (_pm.Money > t.Price) {
                    _pm.Money -= t.Price;
                    staffComponent.BeginTraining(t);
                }
                res = false;
            }
                GUILayout.Label(t.Description);
                GUILayout.EndHorizontal();
            }

            GUILayout.EndVertical();
            GUILayout.EndArea();
            return res;
    }
コード例 #2
0
 internal void addStaff(StaffComponent staffComponent)
 {
     Logger.Log("addstaff Called");
     Staff[StaffCount] = staffComponent;
     StaffCount++;
 }