コード例 #1
0
    //
    public void InitToken(Material mat, GameObject tokenPref, RoadRouter.Type type)
    {
        GameObject token = Instantiate(tokenPref, transform);

        cellInfo.InitNode(mat, token.GetComponent <Token>());
        cellInfo.Type = type;
    }
コード例 #2
0
        //
        public void InitNode(Material mat, Token newToken)
        {
            token          = newToken;
            token.material = mat;

            type  = RoadRouter.Type.node;
            roads = new int[HexMasterData.directionCount];
        }