void Start()
    {
        // get the reference here...
        this.dl = DreamloLeaderBoard.GetSceneDreamloLeaderboard();

        this.timeLeft = startTime;
        this.gs       = gameState.waiting;
    }
コード例 #2
0
 private static void Init()
 {
     if (Instance)
     {
         return;
     }
     Instance = new GameObject("Leaderboard").AddComponent <DreamloLeaderBoard> ();
     Instance.gameObject.hideFlags = HideFlags.HideAndDontSave;
 }
コード例 #3
0
    void Start()
    {
        _ambassador = Ambassador.Instance;

        // This url must remain a secret, to prevent 'enhancements' to players' scores.
        _leaderBoard = DreamloLeaderBoard.GetSceneDreamloLeaderboard();
        _leaderBoard.WebServiceUrl = _specialUrl;
        _leaderBoard.PrivateCode = _privateCode;
        _leaderBoard.PublicCode = _publicCode;
    }
コード例 #4
0
    // Use this for initialization
    void Start()
    {
        nextLevelButton.onClick.AddListener(() => gameManager.Openscene(NextLevel));
        levelItems.Clear();
        totalGoldInLevel      = 0;
        totalValuablesInLevel = 0;

        if (levelRequirments == null)
        {
            Debug.LogWarning("No level Requirments found", this);
        }

        Item[] items = FindObjectsOfType <Item>();

        foreach (Item i in items)
        {
            if (i.itemType == Item.ItemType.GOLD)
            {
                totalGoldInLevel += i.Value;
                levelItems.Add(i);
            }
            else if (i.itemType == Item.ItemType.VALUABLE)
            {
                totalValuablesInLevel += i.Value;
                levelItems.Add(i);
            }
        }

        playerController = FindObjectOfType <FirstPersonController>();
        if (playerController == null)
        {
            Debug.LogError("UHHHH sorry about that boss we cant find the player");
        }
        else
        {
            Player    = playerController.gameObject;
            inventory = Player.GetComponent <Inventory>();

            if (inventory == null)
            {
                Debug.LogError("Player has no inventory");
            }
        }

        LeaderBoard = gameObject.AddComponent <DreamloLeaderBoard>();

        LeaderBoard.privateCode = PublicAndPrivate.privateCode;
        LeaderBoard.publicCode  = PublicAndPrivate.publicCode;

        DisplayLeaderBoard(LeaderBoardScores.Count);
    }
コード例 #5
0
 // Use this for initialization
 void Start()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         _instance = this;
     }
     _dreamLoLB = GetComponent <DreamloLeaderBoard>();
     _dreamLoLB.LoadScores();
     _dreamLoLB.HighScoresLoadedHandler += OnHighScoresLoaded;
     //LoadScores();
     DontDestroyOnLoad(gameObject);
 }
コード例 #6
0
    void Start()
    {
        // get the reference here...
        this.dl = DreamloLeaderBoard.GetSceneDreamloLeaderboard();

        this.timeLeft = startTime;
        this.gs = gameState.waiting;
    }