コード例 #1
0
ファイル: ShipEntity.cs プロジェクト: AG4W/AxiomaticKangaroo
    public void AddMove(Move m, bool clearQueue)
    {
        if (clearQueue)
        {
            _moves.Clear();
            _currentMove = null;
        }

        _moves.Add(m);

        OnMovesUpdated?.Invoke(_moves, _currentMove);
    }
コード例 #2
0
ファイル: ShipEntity.cs プロジェクト: AG4W/AxiomaticKangaroo
    void SetCurrentCommand(Move m = null)
    {
        _currentMove = m;

        if (_currentMove != null)
        {
            _currentMove.Execute();
        }
        else
        {
            _movePosition = null;
            _heading      = null;
        }

        OnMovesUpdated?.Invoke(_moves, _currentMove);
    }