Advertisement
shadowplaycoding

P021_PlayerManager

Jun 12th, 2017
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.90 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.     void OnEnable()
  12.     {
  13.         PlayerManagerInstance = this;
  14.     }
  15.  
  16.     // Use this for initialization
  17.     void Start () {
  18.  
  19.         // Start game with 100 of each resource
  20.         playerResources = new Resources(100, 100, 100);
  21.         Debug.Log("Starting the Game with: " + playerResources.credits + " Credits, " + playerResources.minerals + " Minerals and " + playerResources.food + " Food.");
  22.        
  23.     }
  24.    
  25.     // Update is called once per frame
  26.     void Update () {
  27.        
  28.     }
  29.  
  30.     /*
  31.     Copyright Shadowplay Coding 2017 - see www.shadowplaycoding.com for licensing details
  32.     Removing this comment forfits any rights given to the user under licensing.
  33.     */
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement