Advertisement
shadowplaycoding

P031_PlayerManager

Sep 16th, 2018
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.05 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class PlayerManager : MonoBehaviour {
  6.  
  7.     public static PlayerManager PlayerManagerInstance;
  8.  
  9.     public Resources playerResources { get; set; }
  10.  
  11.     public List<Planet> ownedPlanets;
  12.  
  13.     void OnEnable()
  14.     {
  15.         PlayerManagerInstance = this;
  16.     }
  17.  
  18.     void Awake()
  19.     {
  20.         ownedPlanets = new List<Planet>();
  21.     }
  22.  
  23.     // Use this for initialization
  24.     void Start () {
  25.  
  26.         // Start game with 100 of each resource
  27.         playerResources = new Resources(100, 100, 100);
  28.         Debug.Log("Starting the Game with: " + playerResources.credits + " Credits, " + playerResources.minerals + " Minerals and " + playerResources.food + " Food.");
  29.         TurnManager.turnManagerInstance.UpdateResourceText();
  30.        
  31.     }
  32.    
  33.     // Update is called once per frame
  34.     void Update () {
  35.        
  36.     }
  37.  
  38.     /*
  39.     Copyright Shadowplay Coding 2018 - see www.shadowplaycoding.com for licensing details
  40.     Removing this comment forfits any rights given to the user under licensing.
  41.     */
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement