コード例 #1
0
 protected ObstaclesManager.PlaceHolder GetObstaclePlaceholder(SerializedObstaclePlaceholder sPlaceholder)
 {
     ObstaclesManager.PlaceHolder placeholder = new ObstaclesManager.PlaceHolder();
     placeholder.token    = tokenByName[sPlaceholder.tokenName];
     placeholder.position = new Vector3(sPlaceholder.position[0], sPlaceholder.position[1], sPlaceholder.position[2]);
     placeholder.item     = obstacleManager.ObstacleItemsByName[sPlaceholder.itemName];
     return(placeholder);
 }
コード例 #2
0
    protected SerializedObstaclePlaceholder GetSerializedObstaclePlaceholder(ObstaclesManager.PlaceHolder placeholder)
    {
        SerializedObstaclePlaceholder sPlaceholder = new SerializedObstaclePlaceholder();

        sPlaceholder.tokenName   = placeholder.token.name;
        sPlaceholder.position[0] = placeholder.position.x;
        sPlaceholder.position[1] = placeholder.position.y;
        sPlaceholder.position[2] = placeholder.position.z;
        sPlaceholder.itemName    = placeholder.item.obstacle.name;
        return(sPlaceholder);
    }