コード例 #1
0
 // Start is called before the first frame update
 void Start()
 {
     camera0.gameObject.SetActive(true);
     camera1.gameObject.SetActive(false);
     Cursor.lockState         = CursorLockMode.Locked;
     Cursor.visible           = false;
     editorCanvas.worldCamera = camera0;
     ObjectsPanel.SetActive(false);
     editorScript = FindObjectOfType <LevelEditorScript>();
     editorScript.CurrentCamera = camera0;
 }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        activePositiveIons = new List <GameObject>();
        activeNegativeIons = new List <GameObject>();
        deletedIons        = new List <GameObject>();

        gameManager = GameObject.Find("GameManager");
        cloneFolder = GameObject.Find("CloneFolder");
        if (gameManager == null)
        {
            Debug.LogError("No GameManager found");
        }

        levelEditor = gameManager.GetComponent <LevelEditorScript>();

        if (levelEditor == null)
        {
            Debug.LogError("No level editor script found on the GameManager");
        }
    }
コード例 #3
0
ファイル: LevelEditorScript.cs プロジェクト: antonyip/HexaTD
 void Awake()
 {
     instance = this;
     Input.simulateMouseWithTouches = true;
 }