コード例 #1
0
 private void Start()
 {
     movePlayer              = player.GetComponent <MovePlayerBomberdev>();
     callbackEndCommand      = () => ExecuteNextCommand();
     commandManager          = GetComponent <CommandManagerBomberdev>();
     commandManager.callback = callbackEndCommand;
 }
コード例 #2
0
    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();
    }
コード例 #3
0
 public void Translate(Direction direction, Func.Callback callback)
 {
     translation = new TranslationBomberdev(direction, callback);
 }
コード例 #4
0
 public TranslationBomberdev(Direction direction, Func.Callback callback)
 {
     this.direction = direction;
     this.callback  = callback;
 }