Ejemplo n.º 1
0
    internal void Select( Action action )
    {
        if( action.possible ) {

            if( selectedAction != null ) {
                AbortSelected();
            }

            selectedAction = action;

            action.OnSelected();

            if( action.instant ) {
                ConfirmSelectedAction();
            }

            if( action.subjectType == ActionSubjectType.GridTile ) { //RE-F*****G-MOVE THIS SHIT AND REWRITE GAMEMODE
                GameMode.Set( GameModes.PickTile );
            } else
                if( action.subjectType == ActionSubjectType.Unit ) {
                    GameMode.Set( GameModes.PickUnit );
                }

        } else {

            Debug.Log( owner + " tried to select impossible action " + action.ToLongString() );

        }
    }