public void clear() { this.targetType = RunToTarget.TargetType.Type_Null; this.targetArrived = null; this.goTarget = null; this.moveType = 0; }
public void Target(Vector3 pos, float _radius = 0.6f, Move.PathFinished _delegate = null, int type = 0) { this.clear(); this.targetType = RunToTarget.TargetType.Type_Position; this.posTarget = pos; this.radius = _radius; this.moveType = type; this.targetArrived = _delegate; this.isWalkTo = false; this.Update(); }
public void Target(GameObject _go, float _radius = 0.6f, Move.PathFinished _delegate = null, int type = 0) { this.clear(); if (_go == null) { return; } this.targetType = RunToTarget.TargetType.Type_GameObject; this.goTarget = _go; this.radius = _radius; this.moveType = type; this.targetArrived = _delegate; }
private static int set_targetType(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); RunToTarget runToTarget = (RunToTarget)obj; RunToTarget.TargetType targetType = (RunToTarget.TargetType)((int)ToLua.CheckObject(L, 2, typeof(RunToTarget.TargetType))); runToTarget.targetType = targetType; result = 0; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index targetType on a nil value"); } return(result); }