示例#1
0
    void Awake()
    {
        if (Instance != null && Instance != this)
        {
            Destroy(gameObject);
        }
        Instance = this;
        // Furthermore we make sure that we don't destroy between scenes (this is optional)
        DontDestroyOnLoad(gameObject);

        BoardMatchContainer = new BoardMatchContainer();
        BonusChecker        = new BonusChecker();
    }
	void Awake()
	{
		if (Instance != null && Instance != this)
		{
			Destroy(gameObject);
		}
		Instance = this;
		// Furthermore we make sure that we don't destroy between scenes (this is optional)
		DontDestroyOnLoad(gameObject);

		BoardMatchContainer = new BoardMatchContainer();
		BonusChecker = new BonusChecker();
	}