コード例 #1
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(gameObject);
            return;
        }

        currentGameState = GameState.gameStart;
        canvasScript     = GameObject.Find("Canvas").GetComponent <CanvasController>();
        fieldScript      = GameObject.Find("gameField").GetComponent <GamefieldController>();
        SubscribeToEvent();
    }
コード例 #2
0
 public abstract void SetParent(GamefieldController newParent);
コード例 #3
0
 public override void SetParent(GamefieldController newParent)
 {
     parentScript = newParent;
 }