Advertisement
shadowplaycoding

P026_PlayerManager

Feb 14th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.99 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.        
  30.     }
  31.    
  32.     // Update is called once per frame
  33.     void Update () {
  34.        
  35.     }
  36.  
  37.     /*
  38.     Copyright Shadowplay Coding 2017 - see www.shadowplaycoding.com for licensing details
  39.     Removing this comment forfits any rights given to the user under licensing.
  40.     */
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement