本文实例为大家分享了Unity LineRender实现绘画功能的具体代码,供大家参考,具体内容如下
老规矩,直接上代码:
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DrawLine_ZH : MonoBehaviour
{
private GameObject _Clone;
private LineRenderer _
通过使用turtle绘画象棋棋盘,供大家参考,具体内容如下
# 绘制象棋棋盘
import turtle
t = turtle.Pen()
t.width(2) # 设置画笔粗细
t.speed(1) # 设置画笔移动速度
# 画竖线
t.penup()
t.goto(-400, -400)
for i in range(9):
t.pendown()
if i != 0 and i != 8:
t.goto(-400+i*100, 0)
t.penup()