コード例 #1
0
    //Applies changes from the file to the wall in game
    public override void ApplyChange()
    {
        BoxJson obj = ReadJSON <BoxJson>(this);

        //this.gameObject.transform.GetChild(0).gameObject.SetActive(obj.isActive);
        this.gameObject.transform.GetChild(0).GetComponent <Collider>().enabled = obj.canCollide;
        //text.text = obj.comment;
    }
コード例 #2
0
ファイル: Glitch_Box.cs プロジェクト: eLupins/24HrJam_Unity
    //Applies changes from the file to the wall in game
    public override void ApplyChange()
    {
        string filepath = playerSelectedFilePath + "/" + jsonFileName + ".json";
        string jsontext = System.IO.File.ReadAllText(filepath);

        BoxJson obj = readJSON(jsontext);

        //this.gameObject.transform.GetChild(0).gameObject.SetActive(obj.isActive);
        this.gameObject.transform.GetChild(0).GetComponent <Collider>().enabled = obj.canCollide;
        //text.text = obj.comment;
    }