private void Start() { movePlayer = player.GetComponent <MovePlayerBomberdev>(); callbackEndCommand = () => ExecuteNextCommand(); commandManager = GetComponent <CommandManagerBomberdev>(); commandManager.callback = callbackEndCommand; }
private void Stop() { rigidbody2D.Sleep(); rigidbody2D.constraints = RigidbodyConstraints2D.FreezeAll; Vector2 position = transform.position; position.x = Mathf.Round(position.x); position.y = Mathf.Round(position.y); transform.position = position; oldPosition = position; Func.Callback callback = translation.callback; translation = null; callback(); }
public void Translate(Direction direction, Func.Callback callback) { translation = new TranslationBomberdev(direction, callback); }
public TranslationBomberdev(Direction direction, Func.Callback callback) { this.direction = direction; this.callback = callback; }