Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
new ExecuteCodeAction(
trigger: ActionManager.OnIntersectionEnterTrigger,//アクション発生のきっかけ。ここではparameterで指定されたものと衝突したら。
parameter: snake,
function () {
function () {
var particleSystem = addParticlesToMesh(food, scene);
sleep(250).then(() => {
let currentScore = incrementScore();
//add new mesh length to snake
let currentSpeed = snakeSpeed;
snake.scaling.addInPlace(new Vector3(1, 0, 0));
//increase speed
snakeSpeed = currentSpeed * 2;
//新しいフルーツを生成する (UnityでいうInstantiate)
addNom(scene, snake, snakeSpeed);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.