コード例 #1
0
    protected MovingObject NewSmallObstacle(int sector, float distance, float maxLength)
    {
        MovingObject obj = enviroment.GetMaxLengthObstacle(maxLength);

        if (obj == null)
        {
            throw new System.Exception("Not short enough");
        }
        obj.SetValues(mapValues, sector);
        obj.transform.parent = parent;
        obj.SetDistance(distance);
        obj.Update();
        return(obj);
    }