Created
December 3, 2014 00:30
-
-
Save EsProgram/82f611d54700c0194549 to your computer and use it in GitHub Desktop.
ボールの動き
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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