コード例 #1
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
コード例 #2
0
ファイル: PlayerController.cs プロジェクト: rawrimryno/Zambio
 // Checks to see if the value is already in the dictionary with TryGetValue
 // Then Adds it if it is not.
 public void setPowerUp(GameControllerSingleton.PowerUp check)
 {
     if (!hasPowerUp.Contains(check.alias))
     {
         hasPowerUp.Add(check.alias);
     }
 }
コード例 #3
0
 void Awake()
 {
     hasPowerUp = new Dictionary <string, bool>();
     rb         = GetComponent <Rigidbody>();
     gc         = GameControllerSingleton.get();
     myInv      = GetComponent <Inventory>();
 }
コード例 #4
0
ファイル: PlayerController.cs プロジェクト: mealybug18/Zambio
 void Awake()
 {
     hasPowerUp = new Dictionary<string, bool>();
     rb = GetComponent<Rigidbody>();
     gc = GameControllerSingleton.get();
     myInv = GetComponent<Inventory>();
 }
コード例 #5
0
ファイル: PlayerController.cs プロジェクト: mealybug18/Zambio
 // Checks to see if the value is already in the dictionary with TryGetValue
 // Then Adds it if it is not.
 public void setPowerUp(GameControllerSingleton.PowerUp check)
 {
     bool val;
     if (!hasPowerUp.TryGetValue(check.alias, out val))
     {
         hasPowerUp.Add(check.alias, true);
     }
 }
コード例 #6
0
    public static GameControllerSingleton get()
    {
        if (Instance == null)
        {
            Instance = ScriptableObject.CreateInstance<GameControllerSingleton>();
            Instance.Start();
        }

        return Instance;
    }
コード例 #7
0
    public static GameControllerSingleton get()
    {
        if (Instance == null)
        {
            Instance = ScriptableObject.CreateInstance <GameControllerSingleton>();
            Instance.Start();
        }

        return(Instance);
    }
コード例 #8
0
ファイル: Inventory.cs プロジェクト: mealybug18/Zambio
 void Awake()
 {
     gc         = GameControllerSingleton.get();
     pc         = GetComponent <PlayerController>();
     myContents = new contents();
 }
コード例 #9
0
ファイル: GameController.cs プロジェクト: mealybug18/Zambio
 // Use this for initialization
 void Start()
 {
     gc = GameControllerSingleton.get();
     gc.loadPowerUps(powerUpText);
 }
コード例 #10
0
ファイル: GameController.cs プロジェクト: mealybug18/Zambio
    GameControllerSingleton gc; //GameController

    #endregion Fields

    #region Methods

    // Use this for initialization
    void Start()
    {
        gc = GameControllerSingleton.get();
        gc.loadPowerUps(powerUpText);
    }
コード例 #11
0
ファイル: PlayerController.cs プロジェクト: rawrimryno/Zambio
 void Awake()
 {
     hasPowerUp = new List<string>();
     gc = GameControllerSingleton.get();
     myInv = GetComponent<Inventory>();
 }
コード例 #12
0
ファイル: Inventory.cs プロジェクト: rawrimryno/Zambio
 void Awake()
 {
     gc = GameControllerSingleton.get();
     pc = GetComponent<PlayerController>();
     myContents = new contents();
 }