Skip to content

Instantly share code, notes, and snippets.

@EsProgram
Created December 3, 2014 00:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EsProgram/82f611d54700c0194549 to your computer and use it in GitHub Desktop.
Save EsProgram/82f611d54700c0194549 to your computer and use it in GitHub Desktop.
ボールの動き
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MoveBall : MonoBehaviour
{
private event Action<Transform, System.Object> Move = delegate { };
private bool isMove;
private object param;
private void Update()
{
if(isMove)
{
Move(gameObject.transform, param);
}
}
public void StartMove(Action<Transform, System.Object> position_change, object param)
{
isMove = true;
Move = position_change;
this.param = param;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment